Lines Matching refs:font
126 font = None
137 if name_id <= last_name_id and font is not None:
138 fonts.append(font)
139 font = None
141 if font is None:
142 font = FontInfo()
144 font.family = namerecord.text.strip()
146 font.style = namerecord.text.strip()
148 font.ends_in_regular = ends_in_regular(namerecord.text)
149 font.fullname = namerecord.text.strip()
151 font.version = get_version(namerecord.text)
152 if font is not None:
153 fonts.append(font)
160 font = None
168 font = fonts_iterator.next()
169 font = update_font_name(font)
172 namerecord.text = font.family
174 namerecord.text = font.fullname
177 def update_font_name(font): argument
183 if font.family is None or font.style is None:
185 if font.version is not None:
186 new_family = font.family + font.version
188 new_family = font.family
189 if font.style is 'Regular' and not font.ends_in_regular:
190 font.fullname = new_family
192 font.fullname = new_family + ' ' + font.style
193 font.family = new_family
194 return font