/external/fonttools/Lib/fontTools/ttLib/tables/ |
D | _p_o_s_t.py | 31 def decompile(self, data, ttFont): argument 35 self.decode_format_1_0(data, ttFont) 37 self.decode_format_2_0(data, ttFont) 39 self.decode_format_3_0(data, ttFont) 41 self.decode_format_4_0(data, ttFont) 46 def compile(self, ttFont): argument 51 data = data + self.encode_format_2_0(ttFont) 55 data = data + self.encode_format_4_0(ttFont) 72 def decode_format_1_0(self, data, ttFont): argument 73 self.glyphOrder = standardGlyphOrder[:ttFont["maxp"].numGlyphs] [all …]
|
D | E_B_L_C_.py | 70 def decompile(self, data, ttFont): argument 105 indexSubTable = indexFormatClass(data[indexSubHeaderSize:], ttFont) 114 def compile(self, ttFont): argument 173 glyphIds = list(map(ttFont.getGlyphID, indexSubTable.names)) 176 data = indexSubTable.compile(ttFont) 202 def toXML(self, writer, ttFont): argument 206 curStrike.toXML(curIndex, writer, ttFont) 208 def fromXML(self, name, attrs, content, ttFont): argument 216 curStrike.fromXML(name, attrs, content, ttFont, self) 231 def toXML(self, strikeIndex, writer, ttFont): argument [all …]
|
D | E_B_D_T_.py | 34 def decompile(self, data, ttFont): argument 48 locator = ttFont[self.__class__.locatorName] 63 curGlyph = imageFormatClass(curGlyphData, ttFont) 67 def compile(self, ttFont): argument 83 locator = ttFont[self.__class__.locatorName] 100 data = glyph.compile(ttFont) 118 def toXML(self, writer, ttFont): argument 122 if ttFont.bitmapGlyphDataFormat in ('row', 'bitwise'): 123 locator = ttFont[self.__class__.locatorName] 138 locator = ttFont[self.__class__.locatorName] [all …]
|
D | _k_e_r_n.py | 19 def decompile(self, data, ttFont): argument 46 subtable.decompile(data[:length], ttFont) 50 def compile(self, ttFont): argument 62 data = data + subtable.compile(ttFont) 65 def toXML(self, writer, ttFont): argument 69 subtable.toXML(writer, ttFont) 71 def fromXML(self, name, attrs, content, ttFont): argument 85 subtable.fromXML(name, attrs, content, ttFont) 90 def decompile(self, data, ttFont): argument 113 kernTable[(ttFont.getGlyphName(left), ttFont.getGlyphName(right))] = value [all …]
|
D | _c_m_a_p.py | 22 def decompile(self, data, ttFont): argument 49 table.decompileHeader(data[offset:offset+int(length)], ttFont) 56 def compile(self, ttFont): argument 68 chunk = table.compile(ttFont) 77 def toXML(self, writer, ttFont): argument 81 table.toXML(writer, ttFont) 83 def fromXML(self, name, attrs, content, ttFont): argument 98 table.fromXML(name, attrs, content, ttFont) 107 self.ttFont = None 121 def decompileHeader(self, data, ttFont): argument [all …]
|
D | _h_h_e_a.py | 34 def decompile(self, data, ttFont): argument 37 def compile(self, ttFont): argument 38 if ttFont.isLoaded('glyf') and ttFont.recalcBBoxes: 39 self.recalc(ttFont) 42 def recalc(self, ttFont): argument 43 hmtxTable = ttFont['hmtx'] 44 if 'glyf' in ttFont: 45 glyfTable = ttFont['glyf'] 52 for name in ttFont.getGlyphOrder(): 82 def toXML(self, writer, ttFont): argument [all …]
|
D | _v_h_e_a.py | 32 def decompile(self, data, ttFont): argument 35 def compile(self, ttFont): argument 36 self.recalc(ttFont) 39 def recalc(self, ttFont): argument 40 vtmxTable = ttFont['vmtx'] 41 if 'glyf' in ttFont: 42 if not ttFont.isLoaded('glyf'): 44 glyfTable = ttFont['glyf'] 50 for name in ttFont.getGlyphOrder(): 69 def toXML(self, writer, ttFont): argument [all …]
|
D | _m_a_x_p.py | 35 def decompile(self, data, ttFont): argument 42 def compile(self, ttFont): argument 43 if 'glyf' in ttFont: 44 if ttFont.isLoaded('glyf') and ttFont.recalcBBoxes: 45 self.recalc(ttFont) 48 self.numGlyphs = len(ttFont.getGlyphOrder()) 56 def recalc(self, ttFont): argument 61 glyfTable = ttFont['glyf'] 62 hmtxTable = ttFont['hmtx'] 63 headTable = ttFont['head'] [all …]
|
D | C_O_L_R_.py | 20 def decompile(self, data, ttFont): argument 21 self.getGlyphName = ttFont.getGlyphName # for use in get/set item functions, for access by GID 24 glyphOrder = ttFont.getGlyphOrder() 55 def compile(self, ttFont): argument 57 ttFont.getReverseGlyphMap(rebuild=True) 61 gid = ttFont.getGlyphID(glyphName) 72 layerMap.append(struct.pack(">HH", ttFont.getGlyphID(layer.name), layer.colorID)) 80 def toXML(self, writer, ttFont): argument 87 gid = ttFont.getGlyphID(glyphName) 96 layer.toXML(writer, ttFont) [all …]
|
D | V_O_R_G_.py | 16 def decompile(self, data, ttFont): argument 17 self.getGlyphName = ttFont.getGlyphName # for use in get/set item functions, for access by GID 31 glyphOrder = ttFont.getGlyphOrder() 41 def compile(self, ttFont): argument 44 nameMap = ttFont.getReverseGlyphMap() 49 nameMap = ttFont.getReverseGlyphMap(rebuild=True) 60 def toXML(self, writer, ttFont): argument 73 gid = ttFont.getGlyphID(glyphName) 80 vOriginRec.toXML(writer, ttFont) 82 def fromXML(self, name, attrs, content, ttFont): argument [all …]
|
D | _l_o_c_a.py | 12 def decompile(self, data, ttFont): argument 13 longFormat = ttFont['head'].indexToLocFormat 27 if len(locations) < (ttFont['maxp'].numGlyphs + 1): 28 …loca' table, or wrong numGlyphs in 'maxp': %d %d" % (len(locations) - 1, ttFont['maxp'].numGlyphs)) 31 def compile(self, ttFont): argument 41 ttFont['head'].indexToLocFormat = 0 44 ttFont['head'].indexToLocFormat = 1 52 def toXML(self, writer, ttFont): argument
|
D | sbixBitmapSet.py | 30 def decompile(self, ttFont): argument 58 myBitmap.decompile(ttFont) 63 def compile(self, ttFont): argument 67 glyphOrder = ttFont.getGlyphOrder() 78 myBitmap.compile(ttFont) 101 def toXML(self, xmlWriter, ttFont): argument 108 glyphOrder = ttFont.getGlyphOrder() 111 self.bitmaps[glyphOrder[i]].toXML(xmlWriter, ttFont) 116 def fromXML(self, name, attrs, content, ttFont): argument 133 myBitmap.fromXML(name, attrs, content, ttFont) [all …]
|
D | T_S_I__5.py | 11 def decompile(self, data, ttFont): argument 12 numGlyphs = ttFont['maxp'].numGlyphs 20 self.glyphGrouping[ttFont.getGlyphName(i)] = a[i] 22 def compile(self, ttFont): argument 23 glyphNames = ttFont.getGlyphOrder() 31 def toXML(self, writer, ttFont): argument 37 def fromXML(self, name, attrs, content, ttFont): argument
|
D | _h_m_t_x.py | 17 def decompile(self, data, ttFont): argument 18 numGlyphs = ttFont['maxp'].numGlyphs 19 numberOfMetrics = int(getattr(ttFont[self.headerTag], self.numberOfMetricsName)) 36 glyphOrder = ttFont.getGlyphOrder() 45 def compile(self, ttFont): argument 47 for glyphName in ttFont.getGlyphOrder(): 60 setattr(ttFont[self.headerTag], self.numberOfMetricsName, len(metrics)) 76 def toXML(self, writer, ttFont): argument 87 def fromXML(self, name, attrs, content, ttFont): argument
|
D | _f_p_g_m.py | 8 def decompile(self, data, ttFont): argument 13 def compile(self, ttFont): argument 16 def toXML(self, writer, ttFont): argument 17 self.program.toXML(writer, ttFont) 20 def fromXML(self, name, attrs, content, ttFont): argument 22 program.fromXML(name, attrs, content, ttFont)
|
D | G_M_A_P_.py | 38 def toXML(self, writer, ttFont): argument 55 def fromXML(self, name, attrs, content, ttFont): argument 63 def compile(self, ttFont): argument 80 def decompile(self, data, ttFont): argument 92 def compile(self, ttFont): argument 100 data = data + record.compile(ttFont) 104 def toXML(self, writer, ttFont): argument 115 gmapRecord.toXML(writer, ttFont) 117 def fromXML(self, name, attrs, content, ttFont): argument 127 gmapRecord.fromXML(name, attrs, content, ttFont)
|
D | sbixBitmap.py | 29 def decompile(self, ttFont): argument 30 self.glyphName = ttFont.getGlyphName(self.gid) 45 self.referenceGlyphName = ttFont.getGlyphName(gid) 53 def compile(self, ttFont): argument 59 self.gid = struct.pack(">H", ttFont.getGlyphID(self.glyphName)) 65 def toXML(self, xmlWriter, ttFont): argument 91 def fromXML(self, name, attrs, content, ttFont): argument 99 self.imageData = struct.pack(">H", ttFont.getGlyphID(attrs["glyphname"]))
|
D | _h_d_m_x.py | 15 def decompile(self, data, ttFont): argument 16 numGlyphs = ttFont['maxp'].numGlyphs 17 glyphOrder = ttFont.getGlyphOrder() 30 def compile(self, ttFont): argument 32 numGlyphs = ttFont['maxp'].numGlyphs 33 glyphOrder = ttFont.getGlyphOrder() 47 def toXML(self, writer, ttFont): argument 57 glyphNames = ttFont.getGlyphOrder()[:] 76 def fromXML(self, name, attrs, content, ttFont): argument
|
D | S_V_G_.py | 97 def decompile(self, data, ttFont): argument 104 self.decompile_format_1(data, ttFont) 108 self.decompile_format_0(data, ttFont) 111 def decompile_format_0(self, data, ttFont): argument 150 def decompile_format_1(self, data, ttFont): argument 177 def compile(self, ttFont): argument 179 data = self.compileFormat1(ttFont) 181 data = self.compileFormat0(ttFont) 184 def compileFormat0(self, ttFont): argument 233 def compileFormat1(self, ttFont): argument [all …]
|
D | _s_b_i_x.py | 70 def decompile(self, data, ttFont): argument 86 myBitmapSet.decompile(ttFont) 97 def compile(self, ttFont): argument 107 myBitmapSet.compile(ttFont) 116 def toXML(self, xmlWriter, ttFont): argument 122 self.bitmapSets[i].toXML(xmlWriter, ttFont) 124 def fromXML(self, name, attrs, content, ttFont): argument 132 myBitmapSet.fromXML(name, attrs, content, ttFont)
|
D | DefaultTable.py | 14 def decompile(self, data, ttFont): argument 17 def compile(self, ttFont): argument 20 def toXML(self, writer, ttFont, progress=None): argument 28 writer.dumphex(self.compile(ttFont)) 32 def fromXML(self, name, attrs, content, ttFont): argument 37 self.decompile(readHex(content), ttFont)
|
D | L_T_S_H_.py | 14 def decompile(self, data, ttFont): argument 25 self.yPels[ttFont.getGlyphName(i)] = yPels[i] 27 def compile(self, ttFont): argument 35 yPels[ttFont.getGlyphID(name)] = self.yPels[name] 39 def toXML(self, writer, ttFont): argument 45 def fromXML(self, name, attrs, content, ttFont): argument
|
D | C_P_A_L_.py | 14 def decompile(self, data, ttFont): argument 30 def compile(self, ttFont): argument 41 def toXML(self, writer, ttFont): argument 51 color.toXML(writer, ttFont, cindex) 55 def fromXML(self, name, attrs, content, ttFont): argument 68 color.fromXML(element[0], element[1], element[2], ttFont) 89 def toXML(self, writer, ttFont, index=None): argument 93 def fromXML(self, eltname, attrs, content, ttFont): argument
|
/external/fonttools/Lib/fontTools/ttLib/ |
D | macUtils.py | 81 def __init__(self, path, ttFont, res_id=None): argument 85 fullname = ttFont['name'].getName(4, 1, 0) # Full name, mac, default encoding 86 familyname = ttFont['name'].getName(1, 1, 0) # Fam. name, mac, default encoding 87 psname = ttFont['name'].getName(6, 1, 0) # PostScript name, etc. 102 self.ttFont = ttFont 127 del self.ttFont 161 scale = 4096 / self.ttFont['head'].unitsPerEm 162 fond.ffAscent = scale * self.ttFont['hhea'].ascent 163 fond.ffDescent = scale * self.ttFont['hhea'].descent 164 fond.ffWidMax = scale * self.ttFont['hhea'].advanceWidthMax [all …]
|
/external/fonttools/Lib/fontTools/misc/ |
D | xmlReader.py | 16 def __init__(self, fileName, ttFont, progress=None, quiet=False): argument 17 self.ttFont = ttFont 61 self.ttFont.sfntVersion = sfntVersion 67 subReader = XMLReader(subFile, self.ttFont, self.progress, self.quiet) 75 elif self.ttFont.verbose: 88 if tag == 'loca' and tag in self.ttFont: 91 self.currentTable = self.ttFont[tag] 94 self.ttFont[tag] = self.currentTable 115 self.currentTable.fromXML(name, attrs, content, self.ttFont)
|