DlangIDE v0.8.0 released

Vadim Lopatin coolreader.org at gmail.com
Thu Sep 28 06:27:03 UTC 2017


On Wednesday, 27 September 2017 at 15:24:29 UTC, bitwise wrote:
> One small thing though - when you use the LCD/BGR style fonts, 
> you get a mismatch between the font metrics and bitmap size.
>
> So if you're using FT_LOAD_TARGET_LCD, then some of these may 
> be true:
>
> glyph.bitmap_left != (glyph.metrics.horiBearingX >> 6);
> glyph.bitmap_top != (glyph.metrics.horiBearingY >> 6);
> glyph.bitmap.width != (glyph.metrics.width >> 6);
> glyph.bitmap.rows != (glyph.metrics.height >> 6);
>
> The result could be a crash, clipping, or misalignment of 
> glyphs, depending on the assumptions made by your blitting code.
>
> I asked about this on the FT mailing list, and unfortunately, 
> they don't believe that the 1 or 2 pixels of padding added to 
> the bitmap to accommodate the LCD rendering belongs in metrics.
>
> The fix is simply using bitmap_left, bitmap_top, bitmap.width, 
> bitmap.height, instead of the metrics.
>
> I was looking at the commits and saw that you added kerning, so 
> was wondering if you hit this problem.

Thank you for advice.
It looks like I faced this problem when one of fonts was selected 
for UI.
Will fix.
As well, I see wrong monotype fonts character placement not 
aligned properly.





More information about the Digitalmars-d-announce mailing list