[Top][All Lists]

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

Using non-scalable fonts with the cache API

From: Thomas Pedersen
Subject: Using non-scalable fonts with the cache API
Date: Mon, 6 Jan 2020 10:35:15 +0100

Hi All

This is a cross-post from the freetype mailing list where my question didn’t 
get any responses (since November). I’m trying here as it may be a better fit. 
If such cross-posting is discouraged, I apologise in advance. 

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(). 

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.”). 

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

With best wishes

reply via email to

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