MCPcopy Index your code
hub / github.com/clips/pattern / name2unicode

Function name2unicode

pattern/web/pdf/encodingdb.py:12–18  ·  view source on GitHub ↗

Converts Adobe glyph names to Unicode numbers.

(name)

Source from the content-addressed store, hash-verified

10##
11STRIP_NAME = re.compile(r'[0-9]+')
12def name2unicode(name):
13 """Converts Adobe glyph names to Unicode numbers."""
14 if name in glyphname2unicode:
15 return glyphname2unicode[name]
16 m = STRIP_NAME.search(name)
17 if not m: raise KeyError(name)
18 return unichr(int(m.group(0)))
19
20
21## EncodingDB

Callers 4

add_cid2unichrMethod · 0.90
get_encodingMethod · 0.90
EncodingDBClass · 0.85
get_encodingMethod · 0.85

Calls 2

searchMethod · 0.45
groupMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…