freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Fetching bitmap strike size from GlyphSlot


From: Behdad Esfahbod
Subject: Re: [ft-devel] Fetching bitmap strike size from GlyphSlot
Date: Fri, 21 Dec 2012 17:15:09 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 12-12-21 04:18 PM, Werner LEMBERG wrote:
>>> FreeType doesn't return a 16ppem glyph image at 80ppem for a bitmap
>>> font; this rather causes an error.
>>
>> Really?  Even with SFNT-based bitmap-only fonts?  That's definitely
>> not what I'm observing.
> 
> *Blush* Oh!  Sounds like a bug.  Please send me a sample font.

Really?  I'm not sure we are talking about the same thing...


>>> Perhaps something like this untested code?
>>
>> Right.  That's what I was afraid of.  It's so hard planting that
>> logic into a code otherwise using FreeType to load glyphs.  To
>> contrast, all I need is a function to return the chosen strike.
> 
> It's not completely clear to me what you *exactly* want.  Can you give
> more details?
> 
> An please have a look at function `FT_Match_Size' in `ftobjs.c'.  Does
> this (or some similar code) fits your needs?  It should be
> straightforward to add it to the public API.

Right.  So, the above is not a bug.  cairo, pango, harfbuzz, etc all use
FT_Set_Char_Size(), which does the size matching.  All I need to is to make
the result available.

Humm.  In fact, I now noticed that I probably can use the returned x_ppem /
y_ppem to compare to my request and scale accordingly.  I think you just
solved my problem!

Cheers,
behdad

>     Werner
> 

-- 
behdad
http://behdad.org/



reply via email to

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