This Python script allows you to check and display all available glyphs in a given font file. It provides information about each glyph, including its Unicode code point, character representation, and name.
- Loads and analyzes TrueType (.ttf) and OpenType (.otf) font files
- Displays a list of all available glyphs in the font
- Shows Unicode code point, character, and name for each glyph
- Provides a total count of available glyphs
- Python 3.6+
- fonttools library
- bdflib
-
Clone this repository or download the
pycharmap-unicode.py
file. -
Install the required library:
pip install fonttools
Run the script from the command line, providing the path to the font file as an argument:
python pycharmap-unicode.py <font_file_path>
For example:
python pycharmap-unicode.py Monocraft.ttf
The script will display a list of all available glyphs in the following format:
========================================
U+0020 | | SPACE
U+0021 | ! | EXCLAMATION MARK
U+0022 | " | QUOTATION MARK
...
========================================
Total available glyphs: X
Where:
- U+XXXX is the Unicode code point
- The character between | symbols is the glyph itself
- The text after the second | is the Unicode name of the character
Some characters may not display correctly in your terminal if it doesn't support them or if you're using a font that doesn't include those glyphs.