/external/fonttools/Lib/fontTools/ttLib/tables/ |
D | _h_h_e_a.py | 39 def decompile(self, data, ttFont): argument 42 def compile(self, ttFont): argument 43 if ttFont.recalcBBoxes and (ttFont.isLoaded('glyf') or ttFont.isLoaded('CFF ')): 44 self.recalc(ttFont) 48 def recalc(self, ttFont): argument 49 if 'hmtx' in ttFont: 50 hmtxTable = ttFont['hmtx'] 54 if 'glyf' in ttFont: 55 glyfTable = ttFont['glyf'] 56 for name in ttFont.getGlyphOrder(): [all …]
|
D | _v_h_e_a.py | 38 def decompile(self, data, ttFont): argument 41 def compile(self, ttFont): argument 42 if ttFont.recalcBBoxes and (ttFont.isLoaded('glyf') or ttFont.isLoaded('CFF ')): 43 self.recalc(ttFont) 47 def recalc(self, ttFont): argument 48 if 'vmtx' in ttFont: 49 vmtxTable = ttFont['vmtx'] 53 if 'glyf' in ttFont: 54 glyfTable = ttFont['glyf'] 55 for name in ttFont.getGlyphOrder(): [all …]
|
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 | 74 def decompile(self, data, ttFont): argument 111 indexSubTable = indexFormatClass(data[i+indexSubHeaderSize:], ttFont) 121 def compile(self, ttFont): argument 180 glyphIds = list(map(ttFont.getGlyphID, indexSubTable.names)) 183 data = indexSubTable.compile(ttFont) 209 def toXML(self, writer, ttFont): argument 213 curStrike.toXML(curIndex, writer, ttFont) 215 def fromXML(self, name, attrs, content, ttFont): argument 223 curStrike.fromXML(name, attrs, content, ttFont, self) 238 def toXML(self, strikeIndex, writer, ttFont): argument [all …]
|
D | E_B_D_T_.py | 38 def decompile(self, data, ttFont): argument 52 locator = ttFont[self.__class__.locatorName] 67 curGlyph = imageFormatClass(curGlyphData, ttFont) 71 def compile(self, ttFont): argument 87 locator = ttFont[self.__class__.locatorName] 104 data = glyph.compile(ttFont) 122 def toXML(self, writer, ttFont): argument 126 if ttFont.bitmapGlyphDataFormat in ('row', 'bitwise'): 127 locator = ttFont[self.__class__.locatorName] 142 locator = ttFont[self.__class__.locatorName] [all …]
|
D | _c_m_a_p.py | 70 def decompile(self, data, ttFont): argument 97 table.decompileHeader(data[offset:offset+int(length)], ttFont) 105 def compile(self, ttFont): argument 117 chunk = table.compile(ttFont) 126 def toXML(self, writer, ttFont): argument 130 table.toXML(writer, ttFont) 132 def fromXML(self, name, attrs, content, ttFont): argument 144 table.fromXML(name, attrs, content, ttFont) 164 self.ttFont = None 178 def decompileHeader(self, data, ttFont): argument [all …]
|
D | _k_e_r_n.py | 26 def decompile(self, data, ttFont): argument 68 subtable.decompile(data[:length], ttFont) 72 def compile(self, ttFont): argument 84 data = data + subtable.compile(ttFont) 87 def toXML(self, writer, ttFont): argument 91 subtable.toXML(writer, ttFont) 93 def fromXML(self, name, attrs, content, ttFont): argument 108 subtable.fromXML(name, attrs, content, ttFont) 119 def decompile(self, data, ttFont): argument 147 glyphOrder = ttFont.getGlyphOrder() [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 | 19 def decompile(self, data, ttFont): argument 20 self.getGlyphName = ttFont.getGlyphName # for use in get/set item functions, for access by GID 23 glyphOrder = ttFont.getGlyphOrder() 54 def compile(self, ttFont): argument 56 ttFont.getReverseGlyphMap(rebuild=True) 60 gid = ttFont.getGlyphID(glyphName) 71 layerMap.append(struct.pack(">HH", ttFont.getGlyphID(layer.name), layer.colorID)) 79 def toXML(self, writer, ttFont): argument 86 gid = ttFont.getGlyphID(glyphName) 95 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() 48 nameMap = ttFont.getReverseGlyphMap(rebuild=True) 59 def toXML(self, writer, ttFont): argument 72 gid = ttFont.getGlyphID(glyphName) 79 vOriginRec.toXML(writer, ttFont) 81 def fromXML(self, name, attrs, content, ttFont): argument [all …]
|
D | _c_v_a_r.py | 33 def compile(self, ttFont, useSharedPoints=False): argument 36 pointCount=len(ttFont["cvt "].values), 37 axisTags=[axis.axisTag for axis in ttFont["fvar"].axes], 52 def decompile(self, data, ttFont): argument 53 axisTags = [axis.axisTag for axis in ttFont["fvar"].axes] 62 pointCount=len(ttFont["cvt "].values), sharedTuples=None, 65 def fromXML(self, name, attrs, content, ttFont): argument 70 valueCount = len(ttFont["cvt "].values) 78 def toXML(self, writer, ttFont): argument 79 axisTags = [axis.axisTag for axis in ttFont["fvar"].axes]
|
D | _f_v_a_r.py | 49 def compile(self, ttFont): argument 71 def decompile(self, data, ttFont): argument 92 def toXML(self, writer, ttFont): argument 94 axis.toXML(writer, ttFont) 96 instance.toXML(writer, ttFont) 98 def fromXML(self, name, attrs, content, ttFont): argument 101 axis.fromXML(name, attrs, content, ttFont) 105 instance.fromXML(name, attrs, content, ttFont) 123 def toXML(self, writer, ttFont): argument 124 name = ttFont["name"].getDebugName(self.axisNameID) [all …]
|
D | _l_o_c_a.py | 16 def decompile(self, data, ttFont): argument 17 longFormat = ttFont['head'].indexToLocFormat 30 if len(locations) < (ttFont['maxp'].numGlyphs + 1): 32 len(locations) - 1, ttFont['maxp'].numGlyphs) 35 def compile(self, ttFont): argument 45 ttFont['head'].indexToLocFormat = 0 48 ttFont['head'].indexToLocFormat = 1 55 def toXML(self, writer, ttFont): argument
|
D | _g_v_a_r.py | 52 def compile(self, ttFont): argument 53 axisTags = [axis.axisTag for axis in ttFont["fvar"].axes] 59 ttFont, axisTags, sharedTupleIndices) 84 def compileGlyphs_(self, ttFont, axisTags, sharedCoordIndices): argument 86 for glyphName in ttFont.getGlyphOrder(): 87 glyph = ttFont["glyf"][glyphName] 94 def decompile(self, data, ttFont): argument 95 axisTags = [axis.axisTag for axis in ttFont["fvar"].axes] 96 glyphs = ttFont.getGlyphOrder() 107 glyph = ttFont["glyf"][glyphName] [all …]
|
D | sbixStrike.py | 33 def decompile(self, ttFont): argument 61 current_glyph.decompile(ttFont) 67 def compile(self, ttFont): argument 71 glyphOrder = ttFont.getGlyphOrder() 82 current_glyph.compile(ttFont) 98 def toXML(self, xmlWriter, ttFont): argument 105 glyphOrder = ttFont.getGlyphOrder() 108 self.glyphs[glyphOrder[i]].toXML(xmlWriter, ttFont) 113 def fromXML(self, name, attrs, content, ttFont): argument 145 current_glyph.fromXML(name, attrs, content, ttFont) [all …]
|
D | O_S_2f_2.py | 28 def toXML(self, writer, ttFont): argument 34 def fromXML(self, name, attrs, content, ttFont): argument 108 def decompile(self, data, ttFont): argument 127 def compile(self, ttFont): argument 128 self.updateFirstAndLastCharIndex(ttFont) 130 head = ttFont["head"] 161 def toXML(self, writer, ttFont): argument 180 value.toXML(writer, ttFont) 194 def fromXML(self, name, attrs, content, ttFont): argument 200 panose.fromXML(name, attrs, content, ttFont) [all …]
|
D | _h_e_a_d.py | 38 def decompile(self, data, ttFont): argument 61 def compile(self, ttFont): argument 62 if ttFont.recalcBBoxes: 64 if 'CFF ' in ttFont: 65 topDict = ttFont['CFF '].cff.topDictIndex[0] 67 if ttFont.recalcTimestamp: 72 def toXML(self, writer, ttFont): argument 91 def fromXML(self, name, attrs, content, ttFont): argument
|
D | T_S_I__5.py | 16 def decompile(self, data, ttFont): argument 17 numGlyphs = ttFont['maxp'].numGlyphs 24 self.glyphGrouping[ttFont.getGlyphName(i)] = a[i] 26 def compile(self, ttFont): argument 27 glyphNames = ttFont.getGlyphOrder() 34 def toXML(self, writer, ttFont): argument 40 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) 19 def fromXML(self, name, attrs, content, ttFont): argument 21 program.fromXML(name, attrs, content, ttFont)
|
D | G_M_A_P_.py | 37 def toXML(self, writer, ttFont): argument 53 def fromXML(self, name, attrs, content, ttFont): argument 60 def compile(self, ttFont): argument 77 def decompile(self, data, ttFont): argument 88 def compile(self, ttFont): argument 96 data = data + record.compile(ttFont) 99 def toXML(self, writer, ttFont): argument 110 gmapRecord.toXML(writer, ttFont) 112 def fromXML(self, name, attrs, content, ttFont): argument 122 gmapRecord.fromXML(name, attrs, content, ttFont)
|
D | _h_m_t_x.py | 24 def decompile(self, data, ttFont): argument 25 numGlyphs = ttFont['maxp'].numGlyphs 26 headerTable = ttFont.get(self.headerTag) 51 glyphOrder = ttFont.getGlyphOrder() 66 def compile(self, ttFont): argument 69 for glyphName in ttFont.getGlyphOrder(): 77 headerTable = ttFont.get(self.headerTag) 94 numberOfMetrics = ttFont["maxp"].numGlyphs 115 def toXML(self, writer, ttFont): argument 126 def fromXML(self, name, attrs, content, ttFont): argument
|
D | _h_d_m_x.py | 39 def decompile(self, data, ttFont): argument 40 numGlyphs = ttFont['maxp'].numGlyphs 41 glyphOrder = ttFont.getGlyphOrder() 47 widths = _GlyphnamedList(ttFont.getReverseGlyphMap(), array.array("B", data[2:2+numGlyphs])) 52 def compile(self, ttFont): argument 54 numGlyphs = ttFont['maxp'].numGlyphs 55 glyphOrder = ttFont.getGlyphOrder() 69 def toXML(self, writer, ttFont): argument 79 glyphNames = ttFont.getGlyphOrder()[:] 98 def fromXML(self, name, attrs, content, ttFont): argument
|
D | S__i_l_f.py | 308 def decompile(self, data, ttFont): argument 328 s.decompile(data[offset:], ttFont, self.version) 330 def compile(self, ttFont): argument 341 subdata = s.compile(ttFont, self.version) 348 def toXML(self, writer, ttFont): argument 357 s.toXML(writer, ttFont, self.version) 361 def fromXML(self, name, attrs, content, ttFont): argument 373 s.fromXML(tag, attrs, subcontent, ttFont, self.version) 385 def decompile(self, data, ttFont, version=2.0): argument 410 self.pMap[pseudo.unicode] = ttFont.getGlyphName(pseudo.nPseudo) [all …]
|
/external/fonttools/Snippets/ |
D | otf2ttf.py | 42 def otf_to_ttf(ttFont, post_format=POST_FORMAT, **kwargs): argument 43 assert ttFont.sfntVersion == "OTTO" 44 assert "CFF " in ttFont 46 glyphOrder = ttFont.getGlyphOrder() 48 ttFont["loca"] = newTable("loca") 49 ttFont["glyf"] = glyf = newTable("glyf") 51 glyf.glyphs = glyphs_to_quadratic(ttFont.getGlyphSet(), **kwargs) 52 del ttFont["CFF "] 53 glyf.compile(ttFont) 55 ttFont["maxp"] = maxp = newTable("maxp") [all …]
|
/external/fonttools/Tests/ttLib/tables/ |
D | C_P_A_L_test.py | 65 cpal.decompile(CPAL_DATA_V0, ttFont=None) 76 cpal.decompile(CPAL_DATA_V0_SHARING_COLORS, ttFont=None) 90 cpal.decompile(CPAL_DATA_V1_NOLABELS_NOTYPES, ttFont=None) 102 cpal.decompile(CPAL_DATA_V1, ttFont=None) 114 cpal.decompile(CPAL_DATA_V0, ttFont=None) 115 self.assertEqual(cpal.compile(ttFont=None), CPAL_DATA_V0) 129 self.assertEqual(cpal.compile(ttFont=None), 134 cpal.decompile(CPAL_DATA_V1, ttFont=None) 135 self.assertEqual(cpal.compile(ttFont=None), CPAL_DATA_V1) 139 cpal.decompile(CPAL_DATA_V1_NOLABELS_NOTYPES, ttFont=None) [all …]
|