On the Feodora 23 system I upgraded from F22, the U1F32D symbol ? shows up just fine in the terminal, but on the one I installed from scratch, I get the box-with-numbers placeholder. I just checked and I have about 60 font packages on the system where it doesn't work, and over 200 where it does. Without inspecting each one manually, is there a way to identify which font I need to add?
How to find which font provides a particular Unicode glyph
fontsunicode
Best Answer
This answer has thankfully been superseded by a new option to the
fc-list
command,:charset=1F32D
as given here and available from version 2.11.91 (late December 2014). Thanks to @scruss for this update.To keep the whole history of this answer.
If you give the command
it should list for every font the
charset
property which is a bitmask of which character codes exist in the font. For example, for a simple font likefc-list -v 'Courier 10 Pitch'
it has lines:Take the hex number in the first column, like the last line
00fb
, and shift it left by 8 bits. It is the start of the unicode value. The bitmask 00000006 says a glyph exists for codes 1 and 2 (6 = 2+4 = 1<<1 | 1<<2
) which you add to the first column to get00fb01
and00fb02
. (These glyphs are, for example, latin small ligature fi.)So in the case of
U1F32D
you need to grep for01f3:
and look for a bit set at index2d
in the line, i.e.00000000 00002000 ...
(probably!). Note the 0's here just show the position of the 2. The actual values may be any hex digit. (A grep pattern might be01f3: ........ ....[2367abef]
). The precedingfile:
entry should lead you to the package (userpm -qf filename
).But I'm sure there must be a better way to search for a glyph.