Thanks for the answer. I'll also look into Wine source code.

TheProphet


2009/3/15 Werner LEMBERG <[email protected]>

>
> > I'm using FreeType in my Windows project, and I have some questions
> > about Windows font size vs FreeType FT_Set_Char_Size /
> > FT_Set_Pixel_Sizes:
> >
> > 1. In Win32 API, when I want to output a text at size, for instance,
> > 11 (in wordpad I choose 11 in the combo list box), I use CreateFont
> > / CreateFontIndirect with lfHeight set to -11. Supposing the dpi is
> > 96, what sizes should I use in FT_Set_Char_Size / FT_Set_Pixel_Sizes
> > to match as close as possible the Win32-rendered font ?
>
> Regardless whether you use Windows or FreeType or any other
> typesetting software: 11pt at 96dpi should be the same.
>
> > 2. In Win32 API, I can create a font specifying only lfHeight,
> > leaving lfWidth to zero. In FT_Set_Char_Size / FT_Set_Pixel_Sizes,
> > how could I determine which width to use in order to match the
> > Windows font size ?
>
> I don't know the Win32 API, but normally you *always* specify only the
> (design) height, setting the (design) width to zero.  This is the same
> as if you set the height equal to the width, which means the same size
> in both the vertical and horizontal direction.  If you select
> different values the font gets distorted; in most cases this is not
> what you want.
>
>
>    Werner
>
_______________________________________________
Freetype-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to