1

Imagemagic's convert util (render simple label feature) renders only some of utf-8 symbols.

Here is example:

convert -background white -fill black \
 -density 600x600 -size 1346x756 -font DejaVu-Sans -gravity center \
 'label:⌁ Electricity\nπŸ”Œ Chargers\nπŸ”‹ Powerbanks' \
 out.pdf # or out.png

enter image description here

It renders only ⌁ , not other πŸ”Œ, πŸ”‹ symbols.

What's the most handy, appropriate way to fit it and how: should I install more fonts or use better font?

2

2 Answers 2

3

I've found font 'Symbola', so this works:

convert -background white -fill black \
 -density 600x600 -size 1346x756 -font Symbola -gravity center \
 'label:⌁ Electricity\nπŸ”Œ Chargers\nπŸ”‹ Powerbanks' \
 out_with_Symbola.png

Output:

enter image description here

Thanks for hints in:

1

You may try to use Pango Markup language to render fonts with missing glyphs:

convert -background white -fill black \                                                                                    
 -density 72 -pointsize 72 -gravity center \
 "pango:<span font='DejaVu-Sans'>⌁ Electricity\nπŸ”Œ Chargers\nπŸ”‹ Powerbanks</span>" \
 out.png

Pango renderer tries to use the specified font (DejaVu-Sans), but fallback to the system default if a glyph is missing. Probably, you may nest several <span font='..'>..</span> structures to have a hierarchy of font fallbacks.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .