original_docstring:  Validates that the value is a valid font descriptor string.
          
docstring: Validates that the value is a valid font descriptor string.
docstring_tokens: Validates that the value is a valid font descriptor string .
code: def validate ( self, object, name, value ):
          """ Validates that the value is a valid font descriptor string.
          """
          try:
              point_size = family = style = weight = underline = ''
              facename   = []
              for word in value.split():
                  lword = word.lower()
                  if lword in font_families:
                      family = ' ' + lword
                  elif lword in font_styles:
                      style = ' ' + lword
                  elif lword in font_weights:
                      weight = ' ' + lword
                  elif lword == 'underline':
                      underline = ' ' + lword
                  elif lword not in font_noise:
                      try:
                          int( lword )
                          point_size = lword + ' pt'
                      except:
                          facename.append( word )
              return ('%s%s%s%s%s%s' % ( point_size, family, style, weight, 
                      underline, ' '.join( facename ) )).strip()
          except:
              pass
          raise TraitError, ( object, name, 'a font descriptor string',
                              repr( value ) )
code_tokens: def validate ( self , object , name , value ) : try : point_size = family = style = weight = underline = '' facename = [ ] for word in value . split ( ) : lword = word . lower ( ) if lword in font_families : family = ' ' + lword elif lword in font_styles : style = ' ' + lword elif lword in font_weights : weight = ' ' + lword elif lword == 'underline' : underline = ' ' + lword elif lword not in font_noise : try : int ( lword ) point_size = lword + ' pt' except : facename . append ( word ) return ( '%s%s%s%s%s%s' % ( point_size , family , style , weight , underline , ' ' . join ( facename ) ) ) . strip ( ) except : pass raise TraitError , ( object , name , 'a font descriptor string' , repr ( value ) )
short_docstring: Validates that the value is a valid font descriptor string.
short_docstring_tokens: Validates that the value is a valid font descriptor string .
comment: """ Validates that the value is a valid font descriptor string.
          """