Closed ningliu19 closed 4 years ago
Italic and bold variants are usually in separate font files.
@devongovett thanks for replying! I want to detail a bit:
for example, I want to fetch a Chinese character '我' in Arial font, the glyph turns out to be:
Obviously,
id
is 0 and the glyph path is a 10 segment array(which looks like a box). So does this mean this Chinese character cannot be loaded by fontkit?
thanks!
the id being 0 means the glyph does not exist in this font and you got the .notdef
identifier back. It's not that Fontkit "can't load it", this font does not support 我 at all so there's nothing to load.
@Pomax ah..ok, thanks!
@Pomax however, I tried a font PingFang SC
, still it returns undefined path. I'm very sure this font has the glyph, because in Mac osX pages
it looks like this:
So I'm confused because for this font,
id
is not 0, but path is undefined
I also noticed the
hasError
is true for the returned glyph.
Yep, that sure looks like an error in the CFF parsing part of Fontkit.
Probably fixed by #224?
Hi, I'm trying to use fontkit to extract glyph path from CJK fonts, regular style is OK, but I'm not able to get Italic or bold styled glyph path from CJK fonts. Wondering if this is supported by fontkit? Thanks!