[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: |
Tue, 5 Nov 2019 11:28:56 +0100 |
Hi All
I’m sorry if this has been asked before and answered, but I’ve scoured the web
for a solution without success. 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
Thomas
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Using non-scalable fonts with the cache API,
Thomas Pedersen <=