39

Unicode contains a few special "characters" which are not displayable by most fonts. I want to use one of them, a video camera.

It seems that such a character exists indeed, and has the codepoint U+1F4F9. When I visit http://graphemica.com/%F0%9F%93%B9, I see it displayed both on the webpage and in Firefox's URL bar. So I assume that I have at least one font on my system which contains the glyph.

url with video camera glyph displays correctly

But when I paste it into Inkscape, I get the empty box for an unknown character, even if I choose a font which usually has many glyphs, like Arial.

How do I find out which of the fonts I have installed can display the "character"?

6
  • If the font is not recognized (giving you the empty box), it is likely you don't have the font installed on your system. Therefore, you need to install it before it can be used.
    – CharlieRB
    Commented Feb 11, 2015 at 12:43
  • @CharlieRB the font is installed. I cannot choose to use a font in Inkscape which is not installed. It just doesn't have this very rare glyph.
    – Rumi P.
    Commented Feb 11, 2015 at 13:58
  • OK. You may want to clarify that in your question; that you have the font installed.
    – CharlieRB
    Commented Feb 11, 2015 at 15:13
  • 1
    Firefox may use its own font in Windows 7 and prior versions because there's no font for emoji in those systems. The font is in <firefox>\fonts\EmojiOneMozilla.ttf and not installed globally
    – phuclv
    Commented Oct 14, 2017 at 4:58
  • 1
    There is a similar question which has been answered here.
    – jdhao
    Commented Apr 8, 2018 at 15:53

3 Answers 3

26

Try this page: www.Fileformat.info

http://www.fileformat.info/info/unicode/char/1f4f9/fontsupport.htm

There you can query Unicode characters and get a list of supporting fonts.

4
  • 1
    And it looks like that page can search fonts on your computer too, with a Flash plugin. Commented Feb 16, 2015 at 16:22
  • Thankyou for the answer, Ive been searching for a solution to my "Half OTF half TTF" support error for VS forever now. Commented Jul 28, 2019 at 7:15
  • It can search on local PC with a Flash plugin too, but then it lists all fonts, and if the font does not have the character, it uses the fallback, so in that case it is useless.
    – sdbbs
    Commented Jun 22, 2020 at 9:54
  • An alternative to show how local fonts render a given character without relying on Flash is wordmark.it, which uses an experimental (at the time of writing) browser API to access local fonts, and therefore only works in Chromium-based browsers for the time being. It does have the same drawback that @sdbbs mentioned, though: all local fonts are shown, regardless of whether they have the character or not. I don't think it's totally useless, but it sure is less convenient than getting just the list of relevant fonts.
    – waldyrious
    Commented Jan 2, 2023 at 11:27
23

The following Python script would print all fonts containing a character (tested on my Linux box).

import unicodedata
import os

fonts = []

for root,dirs,files in os.walk("/usr/share/fonts/"):
    for file in files:
       if file.endswith(".ttf"): fonts.append(os.path.join(root,file))


from fontTools.ttLib import TTFont

def char_in_font(unicode_char, font):
    for cmap in font['cmap'].tables:
        if cmap.isUnicode():
            if ord(unicode_char) in cmap.cmap:
                return True
    return False

def test(char):
    for fontpath in fonts:
        font = TTFont(fontpath)   # specify the path to the font in question
        if char_in_font(char, font):
            print(char + " "+ unicodedata.name(char) + " in " + fontpath) 

test(u"😺")
test(u"🐈")

On my machine, this gives:

😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Bold.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Oblique.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Oblique.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-BoldOblique.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/dejavu/DejaVuSansCondensed.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/dejavu/DejaVuSansCondensed-Bold.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/dejavu/DejaVuSans-Oblique.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/dejavu/DejaVuSansCondensed-Oblique.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/dejavu/DejaVuSansCondensed-BoldOblique.ttf
😺 SMILING CAT FACE WITH OPEN MOUTH  in /usr/share/fonts/truetype/dejavu/DejaVuSans-BoldOblique.ttf
🐈 CAT  in /usr/share/fonts/truetype/noto/NotoSansSymbols2-Regular.ttf
3
  • 1
    Note that this requires sudo pip3 install fonttools for Raspberry Pi Raspbian Stretch - however, it will fail with fonttools requires Python '>=3.6' but the running Python is 3.5.3.
    – sdbbs
    Commented Jun 22, 2020 at 10:09
  • 2
    Awesome! There seems to already exist such shell utility though. See unix.stackexchange.com/a/393740/14907 Commented May 19, 2021 at 21:05
  • 1
    This found characters which not exists in tested fonts quite frequently. Something wrong with matching. It also misses lots of fonts where character exists.
    – Peter.k
    Commented Mar 12, 2023 at 23:31
5

I completely understand the question as I ran into the same problem myself:

You know your computer has the font installed because one program displays the content properly, but another program displays the same content as a blank box because it doesn't know what font to use to display properly. And you don't want to scroll through all the fonts to find one that contains the character you want.

Try pasting the copied text/symbol into a blank Microsoft Word doc. The content should appear properly if Word is set to Keep Source Formatting by default for pasted text. If so, select the content and the Word font menu will show you the source font on your computer that contains the necessary character. Granted, there may be others, but at least this is a quick and dirty way to find one font that may be suitable.

2
  • 1
    In Linux, the same can be accomplished with Writer. Commented Jul 18, 2018 at 12:01
  • 1
    issue is that in linux at least you have a fallback font and you don't see it as far as I can tell Commented May 19, 2021 at 20:36

You must log in to answer this question.

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