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

Method get_char_index

lib/matplotlib/_afm.py:418–425  ·  view source on GitHub ↗

Return the glyph index corresponding to a character code point. Note, for AFM fonts, we treat the glyph index the same as the codepoint.

(self,  # For consistency with FT2Font.
                       c: CharacterCodeType)

Source from the content-addressed store, hash-verified

416 return self._metrics[cast(CharacterCodeType, glyph_ind)].name
417
418 def get_char_index(self, # For consistency with FT2Font.
419 c: CharacterCodeType) -> GlyphIndexType:
420 """
421 Return the glyph index corresponding to a character code point.
422
423 Note, for AFM fonts, we treat the glyph index the same as the codepoint.
424 """
425 return cast(GlyphIndexType, c)
426
427 def get_width_char(self, c: CharacterCodeType) -> float:
428 """Get the width of the character code from the character metric WX field."""

Callers 8

_get_infoMethod · 0.80
_get_glyphMethod · 0.80
_get_glyphMethod · 0.80
_get_glyphMethod · 0.80
test_ft2font_charmapsFunction · 0.80
test_ft2font_get_kerningFunction · 0.80
test_ft2font_loadingFunction · 0.80

Calls

no outgoing calls

Tested by 3

test_ft2font_charmapsFunction · 0.64
test_ft2font_get_kerningFunction · 0.64
test_ft2font_loadingFunction · 0.64