13

On Mac OS X, the Character Viewer (equivalent to Character Map on Ubuntu) has a feature where, when looking at a certain character, it can show a list of all fonts that contain that character. Is there something equivalent on Ubuntu?

The use case is that, for instance, I could click on a Kannada character and see all fonts that cover that character (and presumably, the rest of the Kannada language range).


Edit: Just for an idea of what I mean, here's a screenshot of Character Viewer on Mac OS X 10.6. The "Containing selected character" is near the bottom of the screen. I seem to remember that this part of the interface was better in 10.5 or 10.4, actually.

enter image description here

  • 1
    Make a feature request for the Character Map application, please. – Oxwivi Feb 24 '11 at 8:44
  • 3
    @Toki: It took me ages to locate the project responsible for Character Map! Anyway, it's called gucharmap, uses Bugzilla, and this feature has already been asked – in 2007. The reporter even contributed a patch. There are even many other similar bugs/requests in the list. No progress seems to have been made. – ShreevatsaR Feb 24 '11 at 9:13
  • I see, that really sucks and this is a default app of Ubuntu too... And for future reference, you can easily find the package names use Synaptic or even Software Center by going into details. – Oxwivi Feb 24 '11 at 9:38
  • 1
    I've also made a feature request to the Ubuntu maintainers, HERE – palbakulich Feb 24 '11 at 19:21
7

In Fontmatrix you can compare font characteristics - In the Font Information - Compare.

Fontmatrix's Font Compare

PS. I think that feature of Character Viewer on Mac OS X would be an awesome feature request to ask of the fontmatrix developer team.


In fact, the interface of Fontmatrix has something even better: you can select the Preview tab and enter a string (containing characters you would like the font to have), and see how it is displayed by each font. So you can scroll through the list of fonts and simultaneously see the fonts' coverage of all the interesting characters, instead of just one character at a time. This helps you visually pick out the fonts containing the selected character(s).

In the screenshot below, you can see that "BABEL Unicode Bold" (selected) contains all characters except ṝ and that "Arial Regular" (where the mouse is) contains only a few characters.

Screenshot of Fontmatrix's Preview

  • @ShreevatsaR - thanks for the +1, it would be a great feature for fontmatrix, I have made a feature request for it here – palbakulich Feb 24 '11 at 3:38
  • Hey do you mind if I merge my screenshot and description (see my other answer) into this? – ShreevatsaR Jan 16 '12 at 10:18
  • @ShreevatsaR - is that possible? I'm not sure I should be taking credit for your answer though... – palbakulich Jan 21 '12 at 8:47
  • That's ok, you were the one who suggested Fontmatrix. :-) And the goal is to have a good answer for any future searchers with the same question, so credit is secondary... I've edited the answer to elaborate. (Someone else had to approve the edit, and has kindly done so.) Thanks again! – ShreevatsaR Jan 21 '12 at 14:55
  • 1
    This feature seems gone from the latest version of Fontmatrix, or at least I can't find it any more. I don't even see a "Browse" menu any more. – ShreevatsaR Mar 11 '14 at 9:10
1

Since I originally asked this question in 2011, the information has become more difficult to find on both Ubuntu (where the previously recommended FontMatrix no longer seems to have the feature) and on macOS.

If one cares about a language in general rather than a specific character, is to use fc-list with :lang, for example:

~% fc-list :lang=kn-in
/usr/share/fonts/truetype/noto/NotoSansKannadaUI-Regular.ttf: Noto Sans Kannada UI:style=Regular
/usr/share/fonts/truetype/noto/NotoSansKannada-Bold.ttf: Noto Sans Kannada:style=Bold
/usr/share/fonts/truetype/noto/NotoSansKannadaUI-Bold.ttf: Noto Sans Kannada UI:style=Bold
/usr/share/fonts/truetype/noto/NotoSerifKannada-Regular.ttf: Noto Serif Kannada:style=Regular
/usr/share/fonts/truetype/Navilu/Navilu.ttf: Navilu:style=Normal
/usr/share/fonts/truetype/noto/NotoSansKannada-Regular.ttf: Noto Sans Kannada:style=Regular
/usr/share/fonts/truetype/lohit-kannada/Lohit-Kannada.ttf: Lohit Kannada:style=Regular
/usr/share/fonts/truetype/Gubbi/Gubbi.ttf: Gubbi:style=Normal
/usr/share/fonts/truetype/noto/NotoSerifKannada-Bold.ttf: Noto Serif Kannada:style=Bold

For specific characters, I asked a similar question on “Ask Different”; copying here the Python script that I ended up using (it works on both operating systems).

  1. Install either the python-fontconfig or the python3-fontconfig package (or both), depending on whether you prefer to use Python 2 or Python 3.

  2. Save the following code into a file called (say) find_fonts.py:

#!/usr/bin/env python

def find_fonts(c):
    """Finds fonts containing  the (Unicode) character c."""
    import fontconfig
    fonts = fontconfig.query()
    for path in sorted(fonts):
        font = fontconfig.FcFont(path)
        if font.has_char(c):
            yield path

if __name__ == '__main__':
    import sys
    search = sys.argv[1]
    char = search.decode('utf-8') if isinstance(search, bytes) else search
    for path in find_fonts(char):
        print(path)
  1. Run the script with either python find_fonts.py ಠ or python3 find_fonts.py ಠ replacing with the character you care about.

Example output:

$ python3 find_fonts.py ಠ
/usr/share/fonts/truetype/Gubbi/Gubbi.ttf
/usr/share/fonts/truetype/Navilu/Navilu.ttf
/usr/share/fonts/truetype/lohit-kannada/Lohit-Kannada.ttf
/usr/share/fonts/truetype/noto/NotoSansKannada-Bold.ttf
/usr/share/fonts/truetype/noto/NotoSansKannada-Regular.ttf
/usr/share/fonts/truetype/noto/NotoSansKannadaUI-Bold.ttf
/usr/share/fonts/truetype/noto/NotoSansKannadaUI-Regular.ttf
/usr/share/fonts/truetype/noto/NotoSerifKannada-Bold.ttf
/usr/share/fonts/truetype/noto/NotoSerifKannada-Regular.ttf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.