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 .