[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] TrueType bitmap loader does't ignore xsize like .bdf/.pcf
From: |
Keith Packard |
Subject: |
[Freetype] TrueType bitmap loader does't ignore xsize like .bdf/.pcf |
Date: |
Thu, 05 Feb 2004 14:00:20 -0800 |
I'm converting X fonts to .ttf format with Juliusz Chroboczek's fonttosfnt
tool and have discovered an interesting "feature" of the sfnt code. The
bdf and pcf loaders both ignore x_ppem, but the sfnt loader requires
x_ppem to be either 0 or match the x_ppem value in the file.
Well, I'd use '0', but there's no way to get that passed through to the
loader from the public FreeType API -- Set_Char_Size and Set_Pixel_Sizes
both compute x_ppem in a way that it can never be zero.
Set_Pixel_Sizes says that the pixel_width/pixel_height are supposed to
represent an EM square while FT_Bitmap_Size 'width' values are the
'average width' of the font. the sfnt loader appears to use the latter in
matching input to Set_Pixel_Sizes, which belies the documentation for the
function. It might be nice to have the sfnt loader really use the
EM-square rule, but I'm not sure how it could do that.
I guess I'd like to see '0' passed to Set_Pixel_Sizes/Set_Char_Size do the
'right' thing and somehow manage to pass 0 for x_ppem down to the bitmap
loader, then that loader could do whatever it wanted.
-keith
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freetype] TrueType bitmap loader does't ignore xsize like .bdf/.pcf,
Keith Packard <=