class_docstr: Manages a set of fonts: normal, italic, bold, etc...
class_docstr_tok: ["Manages","a","set","of","fonts",":","normal",",","italic",",","bold",",","etc","..."]
code: def _create_win(self):
      lookuperror = None
      keynames = [
          (
              _winreg.HKEY_CURRENT_USER,
              r"Software\Microsoft\Windows NT\CurrentVersion\Fonts",
          ),
          (
              _winreg.HKEY_CURRENT_USER,
              r"Software\Microsoft\Windows\CurrentVersion\Fonts",
          ),
          (
              _winreg.HKEY_LOCAL_MACHINE,
              r"Software\Microsoft\Windows NT\CurrentVersion\Fonts",
          ),
          (
              _winreg.HKEY_LOCAL_MACHINE,
              r"Software\Microsoft\Windows\CurrentVersion\Fonts",
          ),
      ]
      for keyname in keynames:
          try:
              key = _winreg.OpenKey(*keyname)
              try:
                  path = self._lookup_win(
                      key, self.font_name, STYLES["NORMAL"], True
                  )
                  self.fonts["NORMAL"] = ImageFont.truetype(
                      path, self.font_size
                  )
                  for style in ("ITALIC", "BOLD", "BOLDITALIC"):
                      path = self._lookup_win(
                          key, self.font_name, STYLES[style]
                      )
                      if path:
                          self.fonts[style] = ImageFont.truetype(
                              path, self.font_size
                          )
                      else:
                          if style == "BOLDITALIC":
                              self.fonts[style] = self.fonts["BOLD"]
                          else:
                              self.fonts[style] = self.fonts["NORMAL"]
                  return
              except FontNotFound as err:
                  lookuperror = err
              finally:
                  _winreg.CloseKey(key)
          except OSError:
              pass
      else:
          # If we get here, we checked all registry keys and had no luck
          # We can be in one of two situations now:
          # * All key lookups failed. In this case lookuperror is None and we
          #   will raise a generic error
          # * At least one lookup failed with a FontNotFound error. In this
          #   case, we will raise that as a more specific error
          if lookuperror:
              raise lookuperror
          raise FontNotFound("Can't open Windows font registry key")
  
imports: import os
  import sys
  from pygments.formatter import Formatter
  from pygments.util import get_bool_opt, get_int_opt, get_list_opt, get_choice_opt
  import subprocess
label_desc: Use image node_id 7 for calling the FontManager obj's underlying member method code with example usage: obj._create_win() without return types