Page 1 of 1

Fallback Font

Posted: 2019-06-26T00:56:39-07:00
by soumyas
Hi,

I wanted to understand how fonts are chosen in Magick++(the c++ library for ImageMagick).
My use case: I have a bunch of user generated requests that contains some text. I want use this text, generate an image and return it. This image is later used for animation purposes.
My issue is that since the text is user submitted it might be from any language. It can also be a combination of languages. Taking the good old example: My name is ***** where ***** is the name in Chinese. Additionally, we don't know what parts of the text is from a different language.
Is there a way that I can use Font 1 to render "My name is *****", use Font 2 to render any missing glyphs, Font 3 if there are still missing glyphs.
If not, is there there a way to find if there are any missing glyphs, and which ones are they.
I understand that this question has been asked before
https://www.imagemagick.org/discourse-s ... hp?t=30984
https://www.imagemagick.org/discourse-s ... hp?t=32604

However in both of them the solution was to merge the fonts. Since we want to support all languages this is not feasible.

Thanks in Advance!