How can I determine which font is used to render a character? Use Firefox on Linux as an example, a page can have the character 🂡
and it renders correctly (Ace of Spades). However, this isn't in my standard fonts, it has chosen some fallback font to render it. This happens in most of the programs on Ubuntu 12.04.
I need a way to find out which font contains a glyph for a given character. Any command-line tool for linux would be helpful or a simple Python library.
1. In the Character Viewer, click a Category, and scroll to find the glyph you want, then follow the procedure I outlined above. Examine each of the glyphs displayed in the Font Variation section, and pick the font that includes the glyph display you like.
Go to Insert > Symbol. Pick a symbol, or choose More Symbols. Scroll up or down to find the symbol you want to insert. Different font sets often have different symbols in them and the most commonly used symbols are in the Segoe UI Symbol font set.
Material Symbols are our newest icons, consolidating over 2,500 glyphs in a single font file with a wide range of design variants. Symbols are available in three styles and four adjustable variable font axes (fill, weight, grade, and optical size).
From the Fedora wiki.
Looking up this glyph in the
gucharmap
application, using the same font family, is usually sufficient to learn where it's taken from. Gucharmap will display the origin font when you right-click on a glyph.
sudo apt install gucharmap
You can use fontconfig:
fc-list ':charset=<hex_code1> <hex_code2>'
For details see https://unix.stackexchange.com/a/393740/14907
For bash script see gist.github.com/akostadinov/202550a1e2fd4ea8cf523d91b437fa09
#!/usr/bin/env bash
# example: ./font_find.sh 🎩︎
# credits: David Baynard, https://unix.stackexchange.com/a/393740/14907
param="$1"
char=${param:0:1}
printf '%x' \'"$char" | xargs -I{} fc-list ":charset={}"
Alternative Python solution here: https://superuser.com/a/1452828/111432
See there for an answer (if your GNOME version has not deprecated the feature)
https://fedoraproject.org/wiki/Identifying_fonts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With