class_docstr: Helper for font subsetting by the pdf and ps backends.
  
  Maintains a mapping of font paths to the set of character codepoints that
  are being used from that font.
docstr: Record that string *s* is being typeset using font *font*.
docstr_tok: ["Record","that","string","*","s","*","is","being","typeset","using","font","*","font","*","."]
code: def track(self, font, s):
      """Record that string *s* is being typeset using font *font*."""
      char_to_font = font._get_fontmap(s)
      for _c, _f in char_to_font.items():
          self.used.setdefault(_f.fname, set()).add(ord(_c))
  
imports: from io import BytesIO
  import functools
  from fontTools import subset
  import matplotlib
  from ..None import font_manager, ft2font
  from .._afm import AFM
  from ..backend_bases import RendererBase
label_desc: Use image node_id 2 for calling the CharacterTracker obj's underlying member method code with example usage: obj.track(font, s) without return types