[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] freetype + unusual font format: What am I doing wrong?



Hi Westley,

I don't know enough about the Glyph Bitmap Distribution Format to suggest how it should be interpreted. This format was defined by Adobe, and used by X11. The latest linux xterm uses freetype for font rendering.

Lenard Lindstrom

On 13-10-07 11:41 PM, Westley Martínez wrote:
Perhaps it'd be a good idea to contact the maintainers of freetype.
Westley Martínez
EPC Treasurer
(562) 343-0403
westley.fb@xxxxxxxxx


On Mon, Oct 7, 2013 at 10:32 PM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
I looked at the BDF code in freetype2, and then ran a debugger on
pygame.freetype to confirm. In freetype2, when only a "SIZE" record in a BDF
file, the width, in pixels-per-em, is calculated as (height * 2 / 3) [1],
which may not be the point size given in the "SIZE" record. For c64.dbf this
is (8 * 2 / 3) = 5. The width is used as the font size. This is a quirk of
the freetype library. I see no easy work-around.

Lenard Lindstrom

[1] bdfdrivr.c:438, see
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/bdf/bdfdrivr.c?id=VER-2-5-0-1#n438