> First, thanks for all the help this week...

No worries, you're welcome :)

> Does anyone know an easy method for converting a freetype demo to use
> FT_Set_Pixel_Sizes() instead of FT_Set_Char_Size()?

If you're simply talking about the conversion (formula) of the values,
https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html could be what
you were looking for; for example, using something like

```
FT_Set_Char_Size( face,
                  (FT_UInt)round( char_width  / 64.0f * horz_resolution /
72.0f,
                  (FT_UInt)round( char_height / 64.0f * vert_resolution /
72.0f );
'''

(Untested;  please correct me if brackets are missing or I'm mixing up 64s
and 72s here ... errors should be fairly easy to spot).

Note that you lose precision in the process.

Best
Armin



_______________________________________________
Freetype mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype

Reply via email to