[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Font kerning issue
From: |
Matthew Allen |
Subject: |
Re: [ft] Font kerning issue |
Date: |
Tue, 08 Sep 2015 07:51:51 +1000 |
> >>> I'm working on some code that uses Freetype to render text and some
> >>> of the characters are too close together:
> http://stackoverflow.com/questions/32428882/why-does-freetype-render-characters-too-close-together
>
>
> I probably missed it, but could it be that you don't use "bitmap_left"
> and "bitmap_top" in the code?
I didn't know about those at all, after reading up about it I've added this
snippit:
if (Fnt->glyph->format == FT_GLYPH_FORMAT_BITMAP)
{
Px += Fnt->glyph->bitmap_left;
Py = (AscentF >> FShift) - Fnt->glyph->bitmap_top;
}
Just before I copy the bitmap into my image. And now the '1' in 2015 has moved
over 1px and looks correct.
Thank you.
--
Matthew Allen