Lines Matching refs:font

99   print 'Converting font: ' + filename
114 # generate the udpated font now.
119 print filename + ' is not a valid font'
122 print 'Error converting font: ' + filename
136 found in the name table of the font. """
138 font = None
143 # A new font should be created for each platform, encoding and language
146 if name_id <= last_name_id and font is not None:
147 fonts.append(font)
148 font = None
150 if font is None:
151 font = FontInfo()
153 font.family = namerecord.text.strip()
155 font.style = namerecord.text.strip()
157 font.ends_in_regular = ends_in_regular(namerecord.text)
158 font.fullname = namerecord.text.strip()
160 font.version = get_version(namerecord.text)
161 if font is not None:
162 fonts.append(font)
169 font = None
174 font = fonts_iterator.next()
175 font = update_font_name(font)
178 namerecord.text = font.family
180 namerecord.text = font.fullname
183 def update_font_name(font):
184 """ Compute the new font family name and font fullname. If the font has a
185 valid version, it's sanitized and appended to the font family name. The
186 font fullname is then created by joining the new family name and the
187 style. If the style is 'Regular', it is appended only if the original font
189 if font.family is None or font.style is None:
191 if font.version is not None:
192 new_family = font.family + font.version
194 new_family = font.family
195 if font.style is 'Regular' and not font.ends_in_regular:
196 font.fullname = new_family
198 font.fullname = new_family + ' ' + font.style
199 font.family = new_family
200 return font
204 """ According to the specification, the font fullname should not end in