Issue 126753 - Invalid parse of GSUB of OpenType font
Summary: Invalid parse of GSUB of OpenType font
Status: RESOLVED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 4.1.2
Hardware: All All
: P5 (lowest) Normal (vote)
Target Milestone: 4.1.15
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-25 13:24 UTC by hanya
Modified: 2023-02-28 14:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Picture with wrong punctuation glyphs (27.31 KB, image/png)
2015-12-25 13:24 UTC, hanya
no flags Details
Patch to fix invalid read of GSUB tables of OpenType fonts (538 bytes, patch)
2015-12-25 13:26 UTC, hanya
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description hanya 2015-12-25 13:24:24 UTC
Created attachment 85220 [details]
Picture with wrong punctuation glyphs

In Japanese vertical text writting on Writer document, 
some glyphs are not replaced for vertical writting by GSUB table even with OpenType font having GSUB table.
This is because the parse of the GSUB table in the font is invalid.
In FreetypeServerFont::ApplyGSUB function, FeatureParams entry have to be ignored 
while reading feature table. nCntLookups is wrong without the skipping.

In the attached picture, 
- left: AOO 4.1.2, 1st and 4th lines contains wrong punctuation glyphs
- right: with fix, 4th line has been fixed. But 1st line is still the same because Ume Plus is truetype font and not GSUB provided.
Comment 1 hanya 2015-12-25 13:26:29 UTC
Created attachment 85221 [details]
Patch to fix invalid read of GSUB tables of OpenType fonts

See the report description.
Comment 2 hanya 2015-12-25 13:35:01 UTC
Fixed on revision 1721674.
Comment 3 Matthias Seidel 2023-02-28 14:39:30 UTC
Cherry-picked for AOO41X with:
https://github.com/apache/openoffice/commit/d61abae7b9c5f1d9d7773fdd3990a1027142cff0