-
Notifications
You must be signed in to change notification settings - Fork 628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hb-subset: Ligatures and GDEF/GPOS/GSUB not included in the subset font #2575
Comments
@garretrieger @qxliu76 can you have a look if anything unexpected here, weird that all of the tables are dropped, I thought some GPOS subsetting was implemented. |
Since GSUB/GPOS subsetting is not yet fully implemented its disable by default and the two tables are just dropped. You can re-enable subsetting those tables by adding "--drop-tables-=GSUB,GPOS,GDEF" to your subset command. We currently support nearly all lookup types so that should work fine for something like Roboto. |
@garretrieger, thanks! Adding Does anyone know how to achieve the equivalent of that when using |
Similar process, use "hb_subset_input_drop_tables_set" to get the set of tables to be dropped and then remove GSUB, GPOS, and GDEF from the set. For example see the subset fuzzer code: https://github.com/harfbuzz/harfbuzz/blob/master/test/fuzzing/hb-subset-fuzzer.cc#L26 |
Oooh, you'll need something like this then,
|
@ebraminio @garretrieger, thank you so much! It works! I'm looking forward to feature-parity with (Would be nice with a new harfbuzzjs release soon so I don't have to ship the |
Oh, sure! https://github.com/harfbuzz/harfbuzzjs/releases/tag/0.1.3 and of course the updated hb-subset.wasm is included in npm also. btw, Guess you can close this and report other issues separately. Thanks! :) |
Yes, thanks a lot! 🙇 |
Probably a known issue, but I was adviced to open an issue here so it can be tracked 🤗
This Roboto-400.ttf that I downloaded from Google Web Fonts produces an incomplete file when I subset it with
hb-subset
, resulting in ligatures not rendering. Here's a visual diff with magenta showing where the rendering is different from the original:I tried using
ttx
to compare the output ofhb-subset
to that ofpyftsubset
invoked with similar options:The ttx diff shows that the 4 ligature glyphs are missing from
<GlyphOrder>
and<glyf>
, and that the<GDEF>
,<GPOS>
, and<GSUB>
blocks are missing altogether.Tested on Ubuntu 19.10 with harfbuzz compiled from source (8e5bc53).
The text was updated successfully, but these errors were encountered: