<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Find the unicode range name for a glyph (and other fun unicode things)]]></title><description><![CDATA[<p dir="auto">When you're building a large multiscript characterset it may be necessary to find out which unicode range a specific glyph belongs to. Sometimes you can guess from the glyphname, but that is not very reliable.</p>
<p dir="auto">The <code>glyphNameFormatter.reader</code> module (built in RF, thanks!) has a couple of useful functions (full list <a href="https://github.com/LettError/glyphNameFormatter#using-conversion-functions" rel="nofollow">here</a>), particularly the <em>Unicode To Range</em>, or <strong>u2r</strong> can help.</p>
<p dir="auto"><code>glyphNameFormatter.reader</code> has a couple of special dicts: <code>uni2name</code> maps all unicodes with a GNUFL entry to anames. Its keys will then be "all the unicodes we can do something with"</p>
<pre><code class="language-python">from glyphNameFormatter.reader import *

allUnis = list(uni2name.keys())

for v in allUnis[-200:]:
    print(hex(v), chr(v), u2r(v))
</code></pre>
<p dir="auto">This will print something like this:</p>
<pre><code class="language-console">0x1f6e3 🛣 Transport and Map Symbols
0x1f6e4 🛤 Transport and Map Symbols
...
0x1f6f8 🛸 Transport and Map Symbols
0x1f6f9 🛹 Transport and Map Symbols
</code></pre>
<p dir="auto">Suppose you want to find all the unicode values that belong to the <strong>Armenian</strong> range (for instance).</p>
<pre><code class="language-python">from glyphNameFormatter.reader import *

allUnis = list(uni2name.keys())

for v in allUnis:
    if u2r(v) == "Armenian":
        print(hex(v), chr(v), u2r(v))
</code></pre>
<p dir="auto">Prints this:</p>
<pre><code class="language-console">0x531 Ա Armenian
...
0x58f ֏ Armenian
</code></pre>
<p dir="auto">This is how you can get a list of all the supported range names:</p>
<pre><code class="language-python">from glyphNameFormatter.reader import *
print(rangeNames)
</code></pre>
<pre><code class="language-console">['Basic Latin', 'Latin-1 Supplement', 'Latin Extended-A', 'Latin Extended-B', 'IPA Extensions', 'Spacing Modifier Letters', 'Combining Diacritical Marks', 'Greek and Coptic', 'Cyrillic', 'Cyrillic Supplement', 'Armenian', 'Hebrew', 'Arabic', 'Arabic Supplement', 'Devanagari', 'Bengali', 'Gurmukhi', 'Gujarati', 'Oriya', 'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhala', 'Thai', 'Tibetan', 'Hangul Jamo', 'Ethiopic', 'Cherokee', 'Runic', 'Mongolian', 'Vedic Extensions', 'Phonetic Extensions', 'Phonetic Extensions Supplement', 'Combining Diacritical Marks Supplement', 'Latin Extended Additional', 'Greek Extended', 'General Punctuation', 'Superscripts and Subscripts', 'Currency Symbols', 'Letterlike Symbols', 'Number Forms', 'Arrows', 'Mathematical Operators', 'Miscellaneous Technical', 'Control Pictures', 'Optical Character Recognition', 'Enclosed Alphanumerics', 'Box Drawing', 'Block Elements', 'Geometric Shapes', 'Miscellaneous Symbols', 'Dingbats', 'Miscellaneous Mathematical Symbols-A', 'Braille Patterns', 'Glagolitic', 'Latin Extended-C', 'Supplemental Punctuation', 'CJK Symbols and Punctuation', 'Hiragana', 'Katakana', 'Bopomofo', 'Hangul Compatibility Jamo', 'Enclosed CJK Letters and Months', 'CJK Compatibility', 'Latin Extended-D', 'Javanese', 'Latin Extended-E', 'Cherokee Supplement', 'Private Use Area', 'Alphabetic Presentation Forms', 'Arabic Presentation Forms-A', 'Vertical Forms', 'CJK Compatibility Forms', 'Small Form Variants', 'Arabic Presentation Forms-B', 'Halfwidth and Fullwidth Forms', 'Specials', 'Zanabazar Square', 'Domino Tiles', 'Playing Cards', 'Enclosed Alphanumeric Supplement', 'Miscellaneous Symbols and Pictographs', 'Emoticons', 'Transport and Map Symbols']
</code></pre>
<p dir="auto">Finally, if you want to find out more about these really useful functions in <code>glyphNameFormatter.reader</code> have a look at the <a href="https://github.com/LettError/glyphNameFormatter/blob/master/Lib/glyphNameFormatter/reader.py#L36" rel="nofollow">github repo</a></p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.robofont.com/topic/659/find-the-unicode-range-name-for-a-glyph-and-other-fun-unicode-things</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 19:02:15 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/topic/659.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Jun 2019 16:20:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Find the unicode range name for a glyph (and other fun unicode things) on Wed, 08 Jan 2020 22:43:43 GMT]]></title><description><![CDATA[<p dir="auto">When you're building a large multiscript characterset it may be necessary to find out which unicode range a specific glyph belongs to. Sometimes you can guess from the glyphname, but that is not very reliable.</p>
<p dir="auto">The <code>glyphNameFormatter.reader</code> module (built in RF, thanks!) has a couple of useful functions (full list <a href="https://github.com/LettError/glyphNameFormatter#using-conversion-functions" rel="nofollow">here</a>), particularly the <em>Unicode To Range</em>, or <strong>u2r</strong> can help.</p>
<p dir="auto"><code>glyphNameFormatter.reader</code> has a couple of special dicts: <code>uni2name</code> maps all unicodes with a GNUFL entry to anames. Its keys will then be "all the unicodes we can do something with"</p>
<pre><code class="language-python">from glyphNameFormatter.reader import *

allUnis = list(uni2name.keys())

for v in allUnis[-200:]:
    print(hex(v), chr(v), u2r(v))
</code></pre>
<p dir="auto">This will print something like this:</p>
<pre><code class="language-console">0x1f6e3 🛣 Transport and Map Symbols
0x1f6e4 🛤 Transport and Map Symbols
...
0x1f6f8 🛸 Transport and Map Symbols
0x1f6f9 🛹 Transport and Map Symbols
</code></pre>
<p dir="auto">Suppose you want to find all the unicode values that belong to the <strong>Armenian</strong> range (for instance).</p>
<pre><code class="language-python">from glyphNameFormatter.reader import *

allUnis = list(uni2name.keys())

for v in allUnis:
    if u2r(v) == "Armenian":
        print(hex(v), chr(v), u2r(v))
</code></pre>
<p dir="auto">Prints this:</p>
<pre><code class="language-console">0x531 Ա Armenian
...
0x58f ֏ Armenian
</code></pre>
<p dir="auto">This is how you can get a list of all the supported range names:</p>
<pre><code class="language-python">from glyphNameFormatter.reader import *
print(rangeNames)
</code></pre>
<pre><code class="language-console">['Basic Latin', 'Latin-1 Supplement', 'Latin Extended-A', 'Latin Extended-B', 'IPA Extensions', 'Spacing Modifier Letters', 'Combining Diacritical Marks', 'Greek and Coptic', 'Cyrillic', 'Cyrillic Supplement', 'Armenian', 'Hebrew', 'Arabic', 'Arabic Supplement', 'Devanagari', 'Bengali', 'Gurmukhi', 'Gujarati', 'Oriya', 'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhala', 'Thai', 'Tibetan', 'Hangul Jamo', 'Ethiopic', 'Cherokee', 'Runic', 'Mongolian', 'Vedic Extensions', 'Phonetic Extensions', 'Phonetic Extensions Supplement', 'Combining Diacritical Marks Supplement', 'Latin Extended Additional', 'Greek Extended', 'General Punctuation', 'Superscripts and Subscripts', 'Currency Symbols', 'Letterlike Symbols', 'Number Forms', 'Arrows', 'Mathematical Operators', 'Miscellaneous Technical', 'Control Pictures', 'Optical Character Recognition', 'Enclosed Alphanumerics', 'Box Drawing', 'Block Elements', 'Geometric Shapes', 'Miscellaneous Symbols', 'Dingbats', 'Miscellaneous Mathematical Symbols-A', 'Braille Patterns', 'Glagolitic', 'Latin Extended-C', 'Supplemental Punctuation', 'CJK Symbols and Punctuation', 'Hiragana', 'Katakana', 'Bopomofo', 'Hangul Compatibility Jamo', 'Enclosed CJK Letters and Months', 'CJK Compatibility', 'Latin Extended-D', 'Javanese', 'Latin Extended-E', 'Cherokee Supplement', 'Private Use Area', 'Alphabetic Presentation Forms', 'Arabic Presentation Forms-A', 'Vertical Forms', 'CJK Compatibility Forms', 'Small Form Variants', 'Arabic Presentation Forms-B', 'Halfwidth and Fullwidth Forms', 'Specials', 'Zanabazar Square', 'Domino Tiles', 'Playing Cards', 'Enclosed Alphanumeric Supplement', 'Miscellaneous Symbols and Pictographs', 'Emoticons', 'Transport and Map Symbols']
</code></pre>
<p dir="auto">Finally, if you want to find out more about these really useful functions in <code>glyphNameFormatter.reader</code> have a look at the <a href="https://github.com/LettError/glyphNameFormatter/blob/master/Lib/glyphNameFormatter/reader.py#L36" rel="nofollow">github repo</a></p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.robofont.com/post/2462</link><guid isPermaLink="true">https://forum.robofont.com/post/2462</guid><dc:creator><![CDATA[erik]]></dc:creator><pubDate>Wed, 08 Jan 2020 22:43:43 GMT</pubDate></item></channel></rss>