[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] are there font types for which FT_LOAD_NO_RECURSE is supposed t
Re: [ft] are there font types for which FT_LOAD_NO_RECURSE is supposed to fail?
Wed, 19 Sep 2018 09:37:06 +0300
When I looked at the code, I saw that FT_LOAD_NO_RECURSE implies
and FT_LOAD_IGNORE_TRANSFORM which in turn imply FT_LOAD_NO_HINTING,
and kills FT_LOAD_RENDER. This is documented. However, that glyph metrics
are not loaded with FT_LOAD_NO_RECURSE is buried behind the function
pointer of the font-format driver, driver->clazz->load_glyph. Also, on
DejaVuSans.ttf, loading the glyph with FT_LOAD_NO_RECURSE gives the same
metrics value as without it. Where as for NotoSansCJK-Regular.ttc the
metrics are all 0 with FT_LOAD_NO_RECURSE. I am thinking that whether or
not glyph metrics are loaded with FT_LOAD_NO_RECURSE is dependent on font
driver, i.e font format.
I've attached a some-what silly scanner whose base flags are
FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP |
FT_LOAD_IGNORE_TRANSFORM | FT_LOAD_LINEAR_DESIGN and I load the glyph with
these flags 3 times: once just with those, then once with those and
FT_LOAD_NO_RECURSE and once with those and FT_LOAD_VERTICAL for the purpose
of comparing the results for glyphs of fonts.
On Wed, Sep 19, 2018 at 6:14 AM Alexei Podtelezhnikov <address@hidden>
> To understand relationships between the flags, please study just a few
> lines of code here:
> FT_LOAD_NO_RECURSE basically cancels everything including metrics
> calculations. It only gives you a list of glyph components for a
> composite glyph if any. It is also the only way to get that
> information. So if you really need both metrics and components, you
> have to load the glyph twice.
Description: Text Data