freetype-devel
[Top][All Lists]
Advanced

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

Re: Using non-scalable fonts with the cache API


From: Alexei Podtelezhnikov
Subject: Re: Using non-scalable fonts with the cache API
Date: Mon, 6 Jan 2020 10:18:29 -0500

On Mon, Jan 6, 2020 at 5:16 AM Thomas Pedersen <address@hidden> wrote:
> I’m currently building a simple left-to-right string shaper based on freetype 
> and using the cache API. This works very well for scalable fonts, but trying 
> to add support for emoji bitmap fonts such as “Apple Color Emoji” has left me 
> slightly non-plussed. I can use FTC_Manager_LookupFace() without a problem, 
> and by using the right values from fave->available_sizes I can also 
> successfully perform FTC_Manager_LookupSize().

I do not think the FTC subsystem has ever been tested and updated to
support color fonts, neither bitmap nor CPAL/COLR. Most FreeType
customers use their own caching mechanisms. FreeType does not have
resources to update FTC unless somebody volunteers.

> However, when I try to call FT_Load_Glyph() on the face I get a freetype 
> error 36 (bad size handle). Solutions on the web has pointed to requiring a 
> call to FT_Set_Char_Size() before FT_Load_Glyph(), using this or any other 
> size related functions are discouraged in the docs ("Don't use this function 
> if you are using the FreeType cache API.”).

Correct. You need FTC_Manager_LookupSize, but FTC does not support color fonts.

> So, can anyone point me towards best practices for using the cache API along 
> with non-scalable fonts? Any help would be greatly appreciated!

Avoid FTC with color fonts.

Alexei



reply via email to

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