Lines Matching refs:font
102 item = self.conv.read(self.reader, self.font, {})
135 def readArray(self, reader, font, tableDict, count): argument
137 lazy = font.lazy and count > 8
145 l.append(self.read(reader, font, tableDict))
151 l.font = font
162 def read(self, reader, font, tableDict): argument
166 def writeArray(self, writer, font, tableDict, values): argument
168 self.write(writer, font, tableDict, value, i)
170 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
174 def xmlRead(self, attrs, content, font): argument
178 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
184 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
187 def xmlRead(self, attrs, content, font): argument
191 def xmlRead(self, attrs, content, font): argument
196 def read(self, reader, font, tableDict): argument
198 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
203 def read(self, reader, font, tableDict): argument
205 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
209 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
215 def read(self, reader, font, tableDict): argument
217 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
222 def read(self, reader, font, tableDict): argument
224 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
229 def read(self, reader, font, tableDict): argument
231 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
236 def read(self, reader, font, tableDict): argument
238 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
243 def read(self, reader, font, tableDict): argument
245 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
249 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
263 def read(self, reader, font, tableDict): argument
265 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
270 def readArray(self, reader, font, tableDict, count): argument
271 glyphOrder = font.getGlyphOrder()
277 l = [font.getGlyphName(gid) for gid in gids]
279 def read(self, reader, font, tableDict): argument
280 return font.getGlyphName(reader.readUShort())
281 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
282 writer.writeUShort(font.getGlyphID(value))
286 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
288 if font and value:
289 nameTable = font.get("name")
302 def xmlRead(self, attrs, content, font): argument
307 def read(self, reader, font, tableDict): argument
310 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
315 def read(self, reader, font, tableDict): argument
317 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
322 def read(self, reader, font, tableDict): argument
324 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
329 def read(self, reader, font, tableDict): argument
333 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
337 def xmlRead(self, attrs, content, font): argument
341 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
360 def read(self, reader, font, tableDict): argument
371 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
388 def read(self, reader, font, tableDict): argument
390 table.decompile(reader, font)
393 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
394 value.compile(writer, font)
396 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
407 value.toXML(xmlWriter, font, attrs, name=name)
409 def xmlRead(self, attrs, content, font): argument
424 if not hasattr(font, '_propagator'):
425 font._propagator = {}
426 propagator = font._propagator
434 table.fromXML(name, attrs, content, font)
438 table.populateDefaults(propagator=getattr(font, '_propagator', None))
444 propagator = font._propagator
447 del font._propagator
456 def read(self, reader, font, tableDict): argument
459 table.decompile(reader, font)
463 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
474 value.compile(writer, font)
477 conv.write(lengthWriter, font, tableDict, length)
497 def read(self, reader, font, tableDict): argument
503 if font.lazy:
505 table.font = font
507 table.decompile(reader, font)
510 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
520 value.compile(subWriter, font)
538 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
539 super(SubStruct, self).xmlWrite(xmlWriter, font, value, None, attrs)
546 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
547 super(SubTable, self).xmlWrite(xmlWriter, font, value, None, attrs)
551 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
553 Table.write(self, writer, font, tableDict, value, repeatIndex)
567 def read(self, reader, font, tableDict): argument
571 def write(self, writer, font, tableDict, format, repeatIndex=None): argument
579 def read(self, reader, font, tableDict): argument
580 return reader[self.which].readValueRecord(reader, font)
581 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
582 writer[self.which].writeValueRecord(writer, font, value)
583 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
587 value.toXML(xmlWriter, font, self.name, attrs)
588 def xmlRead(self, attrs, content, font): argument
591 value.fromXML(None, attrs, content, font)
605 def read(self, reader, font, tableDict): argument
608 return self.readFormat0(reader, font)
610 return self.readFormat2(reader, font)
612 return self.readFormat4(reader, font)
614 return self.readFormat6(reader, font)
616 return self.readFormat8(reader, font)
620 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
621 values = list(sorted([(font.getGlyphID(glyph), val)
625 self.buildFormat0(writer, font, values),
626 self.buildFormat2(writer, font, values),
627 self.buildFormat6(writer, font, values),
628 self.buildFormat8(writer, font, values),
650 def buildFormat0(self, writer, font, values): argument
651 numGlyphs = len(font.getGlyphOrder())
656 lambda: self.writeFormat0(writer, font, values))
658 def writeFormat0(self, writer, font, values): argument
662 writer, font, tableDict=None,
665 def buildFormat2(self, writer, font, values): argument
680 lambda: self.writeFormat2(writer, font, segments))
682 def writeFormat2(self, writer, font, segments): argument
691 writer, font, tableDict=None,
697 def buildFormat6(self, writer, font, values): argument
701 lambda: self.writeFormat6(writer, font, values))
703 def writeFormat6(self, writer, font, values): argument
711 writer, font, tableDict=None,
716 def buildFormat8(self, writer, font, values): argument
722 lambda: self.writeFormat8(writer, font, values))
724 def writeFormat8(self, writer, font, values): argument
731 writer, font, tableDict=None,
734 def readFormat0(self, reader, font): argument
735 numGlyphs = len(font.getGlyphOrder())
737 reader, font, tableDict=None, count=numGlyphs)
738 return {font.getGlyphName(k): value
741 def readFormat2(self, reader, font): argument
750 value = self.converter.read(reader, font, tableDict=None)
753 mapping[font.getGlyphName(k)] = value
756 def readFormat4(self, reader, font): argument
770 dataReader, font, tableDict=None,
773 mapping[font.getGlyphName(first + k)] = v
776 def readFormat6(self, reader, font): argument
785 reader, font, tableDict=None)
787 mapping[font.getGlyphName(glyphID)] = value
790 def readFormat8(self, reader, font): argument
794 reader, font, tableDict=None, count=count)
795 return {font.getGlyphName(first + k): value
798 def xmlRead(self, attrs, content, font): argument
804 value[a["glyph"]] = self.converter.xmlRead(a, eltContent, font)
807 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
812 xmlWriter, font, value=value,
826 def read(self, reader, font, tableDict): argument
831 offsets = lookup.read(lookupReader, font, tableDict)
836 item.decompile(dataReader, font)
840 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
852 for glyph in sorted(value, key=font.getGlyphID):
854 value[glyph].compile(subWriter, font)
868 lookup.write(lookupWriter, font, tableDict, offsetByGlyph, None)
877 def xmlRead(self, attrs, content, font): argument
879 return lookup.xmlRead(attrs, content, font)
881 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
883 lookup.xmlWrite(xmlWriter, font, value, name, attrs)
910 def read(self, reader, font, tableDict): argument
936 m.SubStruct.decompile(subReader, font)
940 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
959 value.SubStruct.toXML(xmlWriter, font)
963 def xmlRead(self, attrs, content, font): argument
988 m.fromXML(eltName, eltAttrs, eltContent, font)
994 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
1010 value.compile(writer, font)
1030 def read(self, reader, font, tableDict): argument
1057 table.Ligatures = self._readLigatures(ligaturesReader, font)
1062 font, tableDict)
1072 entryIndex, font,
1076 table, perGlyphTableReader, font)
1079 def _readTransition(self, reader, entryIndex, font, actionReader): argument
1083 transition.decompile(entryReader, font, actionReader)
1086 def _readLigatures(self, reader, font): argument
1089 return [font.getGlyphName(g)
1111 def _readPerGlyphLookups(self, table, reader, font): argument
1118 self.perGlyphLookup.read(lookupReader, font, {}))
1121 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
1123 self.classLookup.write(glyphClassWriter, font, tableDict,
1133 self.tableClass.compileActions(font, value.States)
1135 font, value.States, glyphClassCount, actionIndex)
1140 pad(self._compilePerGlyphLookups(value, font), 4)
1147 ligComponentsData = self._compileLigComponents(value, font)
1148 ligaturesData = self._compileLigatures(value, font)
1176 def _compileStates(self, font, states, glyphClassCount, actionIndex): argument
1183 transition.compile(entryWriter, font,
1202 def _compilePerGlyphLookups(self, table, font): argument
1214 self.perGlyphLookup.write(lookupWriter, font,
1219 def _compileLigComponents(self, table, font): argument
1227 def _compileLigatures(self, table, font): argument
1232 writer.writeUShort(font.getGlyphID(glyphName))
1235 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
1247 trans.toXML(xmlWriter, font=font,
1270 self._xmlWriteLigatures(xmlWriter, font, value, name, attrs)
1274 def _xmlWriteLigatures(self, xmlWriter, font, value, name, attrs): argument
1285 def xmlRead(self, attrs, content, font): argument
1293 state = self._xmlReadState(eltAttrs, eltContent, font)
1297 eltAttrs, eltContent, font)
1302 eltAttrs, eltContent, font)
1306 eltAttrs, eltContent, font)
1310 def _xmlReadState(self, attrs, content, font): argument
1317 eltContent, font)
1321 def _xmlReadLigComponents(self, attrs, content, font): argument
1329 def _xmlReadLigatures(self, attrs, content, font): argument
1338 def read(self, reader, font, tableDict): argument
1343 result[cid] = font.getGlyphName(glyphID)
1346 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
1347 items = {cid: font.getGlyphID(glyph)
1354 def xmlRead(self, attrs, content, font): argument
1362 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
1375 def read(self, reader, font, tableDict): argument
1376 glyphOrder = font.getGlyphOrder()
1391 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
1392 items = {font.getGlyphID(g): cid
1400 def xmlRead(self, attrs, content, font): argument
1408 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
1422 def read(self, reader, font, tableDict): argument
1445 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
1466 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
1470 def xmlRead(self, attrs, content, font): argument
1476 def read(self, reader, font, tableDict): argument
1501 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
1525 def read(self, reader, font, tableDict): argument
1540 def write(self, writer, font, tableDict, value, repeatIndex=None): argument
1551 def xmlWrite(self, xmlWriter, font, value, name, attrs): argument
1555 def xmlRead(self, attrs, content, font): argument