sfntly icon indicating copy to clipboard operation
sfntly copied to clipboard

FontViewer: Rules Issue (test font NotoNaskhArabic-Regular.ttf)

Open paulushub opened this issue 7 years ago • 1 comments

Currently the font viewer cannot display the Noto NotoNaskhArabic-Regular.ttf because several 10,000 rules are created causing the application to freeze.

If you comment out line 19 or the code children.add(new GsubRuleSetsNode(gsub)); in the following file com.google.typography.font.tools.fontviewer.GsubTableNode, it will load normally except, there is not rules node.

The actual problem location is applyChainingLookup(...) method in com.google.typography.font.sfntly.table.opentype.component.RuleExtractor where the targetRules becomes very large for some fonts, even though it works with many fonts without a problem.

Any idea what might be the cause of this issue or whether that is expected? (I just started learning about font formats).

paulushub avatar Nov 01 '18 11:11 paulushub

Off the top of my head, I don't have any idea because I don't know the OpenType font format by heart as well.

A little background: I just inherited this project from Google because I had written the FontViewer, in order to understand a strange bug of Microsoft Office 2010 displaying a wrong Arabic character in Calibri.

rillig avatar Nov 07 '18 21:11 rillig