[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Clean-up of af_loader_load_glyph()
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] Clean-up of af_loader_load_glyph() |
Date: |
Tue, 25 Oct 2016 22:47:45 +0200 (CEST) |
> ```
> scaler.face = face;
>
> scaler.x_scale = size->metrics.x_scale;
>
> scaler.x_delta = 0; /* XXX: TODO: add support for sub-pixel hinting */
> scaler.y_scale = size->metrics.y_scale;
>
> scaler.y_delta = 0; /* XXX: TODO: add support for sub-pixel hinting */
>
>
> scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags );
>
> scaler.flags = 0; /* XXX: fix this */
> ```
>
> What exactly is this subpixel hinting and what is needed to support
> it?
Good question. I guess it means that hinting support should be added
for glyphs where the origin is not positioned at an integer pixel
value.
> What about the flags needs to be fixed?
I no longer remember, sorry.
> ```
> #ifdef FT_OPTION_AUTOFIT2
>
> /* XXX: undocumented hook to activate the latin2 writing system */
> if ( load_flags & ( 1UL << 20 ) )
>
> options = AF_STYLE_LTN2_DFLT;
>
> #endif
> ```
>
> Is this used in any capacity?
No. However, please don't touch it; it's a constant remainder to
finally check the code in aflatin2.c :-)
> ```
> /* for mono-width fonts (like Andale, Courier, etc.) we need */
> /* to keep the original rounded advance width; ditto for */
> /* digits if all have the same advance width */
> [...]
> ```
>
> Why is this ifdef'ed out?
I can't remember. Maybe you can find out more with `git blame'.
> Why is the second block below that ifdef'ed out?
Same answer.
> Can they be removed?
Probably yes.
Werner