original_docstring: Configure all fonts in the default fonts dict.
docstring: Configure all fonts in the default fonts dict.
docstring_tokens: Configure all fonts in the default fonts dict .
code: def configure_fonts(self):
          """Configure all fonts in the default fonts dict."""
          c = self.c
          isQt = g.app.gui.guiName().startswith('qt')
          wrapper = self.wrapper
          #
          # Get the default body font.
          defaultBodyfont = self.fonts.get('default_body_font')
          if not defaultBodyfont:
              defaultBodyfont = c.config.getFontFromParams(
                  "body_text_font_family", "body_text_font_size",
                  "body_text_font_slant", "body_text_font_weight",
                  c.config.defaultBodyFontSize)
              self.fonts['default_body_font'] = defaultBodyfont
          #
          # Set all fonts.
          for key in sorted(self.default_font_dict.keys()):
              option_name = self.default_font_dict[key]
              # Find language specific setting before general setting.
              table = (
                  f"{self.language}_{option_name}",
                  option_name,
              )
              for name in table:
                  font = self.fonts.get(name)
                  if font:
                      break
                  font = self.find_font(key, name)
                  if font:
                      self.fonts[key] = font
                      wrapper.tag_configure(key, font=font)
                      if isQt and key == 'url':
                          font.setUnderline(True)
                      # #1919: This really isn't correct.
                      self.configure_hard_tab_width(font)
                      break
              else:
                  # Neither setting exists.
                  self.fonts[key] = None  # Essential
                  wrapper.tag_configure(key, font=defaultBodyfont)
code_tokens: def configure_fonts ( self ) : c = self . c isQt = g . app . gui . guiName ( ) . startswith ( 'qt' ) wrapper = self . wrapper defaultBodyfont = self . fonts . get ( 'default_body_font' ) if not defaultBodyfont : defaultBodyfont = c . config . getFontFromParams ( "body_text_font_family" , "body_text_font_size" , "body_text_font_slant" , "body_text_font_weight" , c . config . defaultBodyFontSize ) self . fonts [ 'default_body_font' ] = defaultBodyfont for key in sorted ( self . default_font_dict . keys ( ) ) : option_name = self . default_font_dict [ key ] table = ( f"{self.language}_{option_name}" , option_name , ) for name in table : font = self . fonts . get ( name ) if font : break font = self . find_font ( key , name ) if font : self . fonts [ key ] = font wrapper . tag_configure ( key , font = font ) if isQt and key == 'url' : font . setUnderline ( True ) self . configure_hard_tab_width ( font ) break else : self . fonts [ key ] = None wrapper . tag_configure ( key , font = defaultBodyfont )
short_docstring: Configure all fonts in the default fonts dict.
short_docstring_tokens: Configure all fonts in the default fonts dict .
comment: """Configure all fonts in the default fonts dict."""$SEP$#$SEP$# Get the default body font.$SEP$#$SEP$# Set all fonts.$SEP$# Find language specific setting before general setting.$SEP$# #1919: This really isn't correct.$SEP$# Neither setting exists.$SEP$# Essential