class_docstr: A class that convert a given text to a path using ttf fonts.
docstr: convert the string *s* to vertices and codes using the
  provided ttf font.
docstr_tok: ["convert","the","string","*","s","*","to","vertices","and","codes","using","the","provided","ttf","font","."]
code: def get_glyphs_with_font(
      self, font, s, glyph_map=None, return_new_glyphs_only=False
  ):
      """
      convert the string *s* to vertices and codes using the
      provided ttf font.
      """
  
      # Mostly copied from backend_svg.py.
  
      lastgind = None
  
      currx = 0
      xpositions = []
      glyph_ids = []
  
      if glyph_map is None:
          glyph_map = OrderedDict()
  
      if return_new_glyphs_only:
          glyph_map_new = OrderedDict()
      else:
          glyph_map_new = glyph_map
  
      # I'm not sure if I get kernings right. Needs to be verified. -JJL
  
      for c in s:
          ccode = ord(c)
          gind = font.get_char_index(ccode)
          if gind is None:
              ccode = ord("?")
              gind = 0
  
          if lastgind is not None:
              kern = font.get_kerning(lastgind, gind, KERNING_DEFAULT)
          else:
              kern = 0
  
          glyph = font.load_char(ccode, flags=LOAD_NO_HINTING)
          horiz_advance = glyph.linearHoriAdvance / 65536.0
  
          char_id = self._get_char_id(font, ccode)
          if char_id not in glyph_map:
              glyph_map_new[char_id] = self.glyph_to_path(font)
  
          currx += kern / 64.0
  
          xpositions.append(currx)
          glyph_ids.append(char_id)
  
          currx += horiz_advance
  
          lastgind = gind
  
      ypositions = [0] * len(xpositions)
      sizes = [1.0] * len(xpositions)
  
      rects = []
  
      return (
          list(zip(glyph_ids, xpositions, ypositions, sizes)),
          glyph_map_new,
          rects,
      )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from collections import OrderedDict
  import six
  from six.moves import zip
  import warnings
  import numpy
  from matplotlib.path import Path
  from matplotlib import rcParams
  import matplotlib.font_manager
  from matplotlib.ft2font import KERNING_DEFAULT, LOAD_NO_HINTING
  from matplotlib.ft2font import LOAD_TARGET_LIGHT
  from matplotlib.mathtext import MathTextParser
  import matplotlib.dviread
  from matplotlib.font_manager import FontProperties, get_font
  from matplotlib.transforms import Affine2D
  from six.moves.urllib.parse import quote
label_desc: Use image node_id 10 for calling the TextToPath obj's underlying member method code with example usage: obj.get_glyphs_with_font(font, s, glyph_map, return_new_glyphs_only) and returns: list,  glyph_map_new,  rects