silnrsi / font-ttf-scripts

Font::TTF::Scripts perl module
Artistic License 2.0
19 stars 7 forks source link

ttfsubset causes sileftml error "Invalid glyph index" #22

Open bobh0303 opened 3 years ago

bobh0303 commented 3 years ago

Summary:

To reproduce:

Using the ScheherazadeNew branch ttfsubset_bug#1, build font (i.e.: smith distclean; smith configure; smith build) with default settings, then execute smith sileftml. Result will include an error:

libtexpdf:fatal: Invalid glyph index (gid 1686)

However, if font is built with -d option, i.e., smith distclean; smith configure; smith build -d, then smith sileftml completes without error.

NB: In wscript, -d suppresses the call to ttfsubset (which tries to make the fonts smaller).

bobh0303 commented 3 years ago

Hm, I'm not seeing arab script (or its languages) retained in the subsetted font, in spite of what the wscript says:

ttfsubset -s latn,arab -l KIR,JUR,RHG,SND,URD,WLF ${DEP} ${TGT}
mhosken commented 3 years ago

To help debug this, it would be good to know what the missing glyphs are. Is it that the subset is missing cmap entries? or is an OT rule calling for a glyph id that has been removed?