Page 1 of 1

Font fallback for missing glyphs

Posted: 2016-12-02T13:31:17-07:00
by mad182
Hello!

I wanted to know, if it's possible to have some kind of fallback mechanism to automatically use a glyph from another font when it's not found in the one currently used (writing text using label:)?

For example, if I'm using Impact font and there is some unicode symbol, like "♥" (u+1f496/💖) in the text, it's displayed as "?"
It's kind of expected, as the Impact.ttf does not contain such symbol, but I know it exists in seguiemj.ttf

So, is there a way to tell imagemagick to look for the glyph in seguiemj.ttf, when it's not found in Impact.ttf?

Re: Font fallback for missing glyphs

Posted: 2016-12-02T13:34:27-07:00
by Bonzo
You could make your own font by combining two fonts: http://superuser.com/questions/490922/merging-two-fonts

Re: Font fallback for missing glyphs

Posted: 2016-12-02T13:47:11-07:00
by mad182
I have quite a lot of them, but I guess if it's possible to automatically merge them, that may work.

Thanks, I will try it out!

Re: Font fallback for missing glyphs

Posted: 2016-12-02T14:28:06-07:00
by mad182
Seems to be working pretty well.

Image

If anyone else stumbles upon this topic, I used this to merge the fonts:
https://github.com/fonttools/fonttools