You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for all the work you do on Prawn and TTFunk! The ruby community really appreciates it :)
I'm trying to use TTFunk to subset the Noto font, but getting an error with the following snippet (adapted from looking at the tests):
font=TTFunk::File.open('path/to/NotoSansCJKjp-Regular.otf')subset=TTFunk::Subset.for(font,:unicode)subset.use(0x304b)# Katakana letter "ka"subset.encode
I get the following error:
NoMethodError: undefined method `key?' for nil:NilClass
from /Users/cameron/workspace/ttfunk/lib/ttfunk/table/glyf.rb:30:in `for'
from /Users/cameron/workspace/ttfunk/lib/ttfunk/subset/base.rb:158:in `block in collect_glyphs'
from /Users/cameron/workspace/ttfunk/lib/ttfunk/subset/base.rb:157:in `each'
from /Users/cameron/workspace/ttfunk/lib/ttfunk/subset/base.rb:157:in `each_with_object'
from /Users/cameron/workspace/ttfunk/lib/ttfunk/subset/base.rb:157:in `collect_glyphs'
from /Users/cameron/workspace/ttfunk/lib/ttfunk/subset/base.rb:32:in `encode'
Hey guys,
First of all, thanks for all the work you do on Prawn and TTFunk! The ruby community really appreciates it :)
I'm trying to use TTFunk to subset the Noto font, but getting an error with the following snippet (adapted from looking at the tests):
I get the following error:
It looks like the
@cache
variable isnil
.Any idea why that would be? I would be happy to track down the issue and submit a pull request, but I have no idea where to start. Thanks!
Oh, and here's the font in question:
NotoSansCJKjp-Regular.otf.zip
The text was updated successfully, but these errors were encountered: