freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] FT_Set_Char_Size vs. FT_Set_Pixel_Sizes


From: Olumide
Subject: Re: [ft] FT_Set_Char_Size vs. FT_Set_Pixel_Sizes
Date: Thu, 17 Nov 2016 17:58:17 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 17/11/2016 16:46, Werner LEMBERG wrote:

I am using FreeType not to render to screen but just to rasterize a
font for some esoteric purpose that I won't bother to describe.
That said should I be using FT_Set_Char_Size or FT_Set_Pixel_Sizes?

It doesn't matter.  Both work the same.

As I am not rendering to screen, dpi does not matter in the
slightest bit.

Well, then use FT_Set_Pixel_Sizes.

Thanks for your reply.

I've only just started using FreeType so please excuse the level of ignorance that I'm about to display. (I _have_ read the tutorial even though my ignorance may suggest otherwise.)

I have used FT_Set_Pixel_Sizes( face , 32 , 32 ) -- because 32 by 32 is the maximum font dimension of a font in my application. Upon inspection of the resulting face->glyph I get a bitmap that's only about 25% of the size specified in FT_Set_Pixel_Sizes (Bitmap details: rows = top = 22, width = 13, left = 1). Of course I may have completely misunderstood what FT_Set_Pixel_Sizes does. Please do correct me where my thinking or understanding is incorrect.

Also, how is are the bitmap properties (rows, top and width) determined? Are they partly based on some meta data the TTF font file or are they _solely_ based on the user specified size?

Regards,

- Olumide




reply via email to

[Prev in Thread] Current Thread [Next in Thread]