Fallback Font

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
soumyas
Posts: 1
Joined: 2019-06-26T00:47:01-07:00
Authentication code: 1152

Fallback Font

Post 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!
Post Reply