MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / enc

Function enc

lib/matplotlib/tests/test_ft2font.py:269–276  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

267
268def test_ft2font_charmaps():
269 def enc(name):
270 # We don't expose the encoding enum from FreeType, but can generate it here.
271 # For DejaVu, there are 5 charmaps, but only 2 have enum entries in FreeType.
272 e = 0
273 for x in name:
274 e <<= 8
275 e += ord(x)
276 return e
277
278 file = fm.findfont('DejaVu Sans')
279 font = ft2font.FT2Font(file)

Callers 1

test_ft2font_charmapsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected