[AD] TTF addon does not get screen DPI properly

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hello,

I have discovered a bug in the TTF addon. On my system, it renders the glyphs smaller than they should be. This is verified by drawing a rectangle around the font, taking the al_font_text_height as the font height estimate. In my case, the estimate was way off.

I fixed this by altering this line in al_ttf_load_font():

FT_Set_Pixel_Sizes(face, 0, size);

changed to:

FT_Set_Char_Size(face, 0, 64 * size, 96, 96);

That is, I overrode the default dpi of 72 to 96, which apparently matches my monitor. Now, I am guessing that this doesn't always apply for all people, since some might actually have the 72 dpi for their monitors. I am unsure how to fix this, but thought I'd bring this up.

Incidentally, for future reference, do you people prefer bug reports via the forums, this list or the sourceforge thing?

SiegeLord


      




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/