HomeSort by relevance Sort by last modified time
    Searched refs:ttFont (Results 1 - 25 of 43) sorted by null

1 2

  /external/fonttools/Lib/fontTools/ttLib/tables/
_f_p_g_m.py 8 def decompile(self, data, ttFont):
13 def compile(self, ttFont):
16 def toXML(self, writer, ttFont):
17 self.program.toXML(writer, ttFont)
20 def fromXML(self, name, attrs, content, ttFont):
22 program.fromXML(name, attrs, content, ttFont)
_v_h_e_a.py 32 def decompile(self, data, ttFont):
35 def compile(self, ttFont):
36 self.recalc(ttFont)
39 def recalc(self, ttFont):
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)
    [all...]
_h_h_e_a.py 34 def decompile(self, data, ttFont):
37 def compile(self, ttFont):
38 if ttFont.isLoaded('glyf') and ttFont.recalcBBoxes:
39 self.recalc(ttFont)
42 def recalc(self, ttFont):
43 hmtxTable = ttFont['hmtx']
44 if 'glyf' in ttFont:
45 glyfTable = ttFont['glyf']
52 for name in ttFont.getGlyphOrder()
    [all...]
_l_o_c_a.py 12 def decompile(self, data, ttFont):
13 longFormat = ttFont['head'].indexToLocFormat
27 if len(locations) < (ttFont['maxp'].numGlyphs + 1):
28 warnings.warn("corrupt 'loca' table, or wrong numGlyphs in 'maxp': %d %d" % (len(locations) - 1, ttFont['maxp'].numGlyphs))
31 def compile(self, ttFont):
41 ttFont['head'].indexToLocFormat = 0
44 ttFont['head'].indexToLocFormat = 1
52 def toXML(self, writer, ttFont):
_m_a_x_p.py 35 def decompile(self, data, ttFont):
42 def compile(self, ttFont):
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):
61 glyfTable = ttFont['glyf']
62 hmtxTable = ttFont['hmtx'
    [all...]
T_S_I__5.py 11 def decompile(self, data, ttFont):
12 numGlyphs = ttFont['maxp'].numGlyphs
20 self.glyphGrouping[ttFont.getGlyphName(i)] = a[i]
22 def compile(self, ttFont):
23 glyphNames = ttFont.getGlyphOrder()
31 def toXML(self, writer, ttFont):
37 def fromXML(self, name, attrs, content, ttFont):
DefaultTable.py 14 def decompile(self, data, ttFont):
17 def compile(self, ttFont):
20 def toXML(self, writer, ttFont, progress=None):
28 writer.dumphex(self.compile(ttFont))
32 def fromXML(self, name, attrs, content, ttFont):
37 self.decompile(readHex(content), ttFont)
L_T_S_H_.py 14 def decompile(self, data, ttFont):
20 #assert numGlyphs == ttFont['maxp'].numGlyphs
25 self.yPels[ttFont.getGlyphName(i)] = yPels[i]
27 def compile(self, ttFont):
33 #assert len(self.yPels) == ttFont['maxp'].numGlyphs == numGlyphs
35 yPels[ttFont.getGlyphID(name)] = self.yPels[name]
39 def toXML(self, writer, ttFont):
45 def fromXML(self, name, attrs, content, ttFont):
_k_e_r_n.py 19 def decompile(self, data, ttFont):
46 subtable.decompile(data[:length], ttFont)
50 def compile(self, ttFont):
62 data = data + subtable.compile(ttFont)
65 def toXML(self, writer, ttFont):
69 subtable.toXML(writer, ttFont)
71 def fromXML(self, name, attrs, content, ttFont):
85 subtable.fromXML(name, attrs, content, ttFont)
90 def decompile(self, data, ttFont):
113 kernTable[(ttFont.getGlyphName(left), ttFont.getGlyphName(right))] = valu
    [all...]
_p_o_s_t.py 31 def decompile(self, data, ttFont):
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):
51 data = data + self.encode_format_2_0(ttFont)
55 data = data + self.encode_format_4_0(ttFont)
62 """This function will get called by a ttLib.TTFont instance.
63 Do not call this function yourself, use TTFont().getGlyphOrder(
    [all...]
C_O_L_R_.py 16 ttFont['COLR'][<glyphName>] will return the color layers for any glyph
17 ttFont['COLR'][<glyphName>] = <value> will set the color layers for any glyph.
20 def decompile(self, data, ttFont):
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):
57 ttFont.getReverseGlyphMap(rebuild=True)
61 gid = ttFont.getGlyphID(glyphName)
63 assert 0, "COLR table contains a glyph name not in ttFont.getGlyphNames(): " + str(glyphName)
72 layerMap.append(struct.pack(">HH", ttFont.getGlyphID(layer.name), layer.colorID)
    [all...]
F_F_T_M_.py 19 def decompile(self, data, ttFont):
22 def compile(self, ttFont):
26 def toXML(self, writer, ttFont):
40 def fromXML(self, name, attrs, content, ttFont):
_h_e_a_d.py 35 def decompile(self, data, ttFont):
41 def compile(self, ttFont):
42 if ttFont.recalcTimestamp:
47 def toXML(self, writer, ttFont):
69 def fromXML(self, name, attrs, content, ttFont):
E_B_D_T_.py 34 def decompile(self, data, ttFont):
48 locator = ttFont[self.__class__.locatorName]
63 curGlyph = imageFormatClass(curGlyphData, ttFont)
67 def compile(self, ttFont):
83 locator = ttFont[self.__class__.locatorName]
100 data = glyph.compile(ttFont)
118 def toXML(self, writer, ttFont):
122 if ttFont.bitmapGlyphDataFormat in ('row', 'bitwise'):
123 locator = ttFont[self.__class__.locatorName]
138 locator = ttFont[self.__class__.locatorName
    [all...]
_h_d_m_x.py 15 def decompile(self, data, ttFont):
16 numGlyphs = ttFont['maxp'].numGlyphs
17 glyphOrder = ttFont.getGlyphOrder()
30 def compile(self, ttFont):
32 numGlyphs = ttFont['maxp'].numGlyphs
33 glyphOrder = ttFont.getGlyphOrder()
47 def toXML(self, writer, ttFont):
57 glyphNames = ttFont.getGlyphOrder()[:]
76 def fromXML(self, name, attrs, content, ttFont):
_h_m_t_x.py 17 def decompile(self, data, ttFont):
18 numGlyphs = ttFont['maxp'].numGlyphs
19 numberOfMetrics = int(getattr(ttFont[self.headerTag], self.numberOfMetricsName))
36 glyphOrder = ttFont.getGlyphOrder()
45 def compile(self, ttFont):
47 for glyphName in ttFont.getGlyphOrder():
60 setattr(ttFont[self.headerTag], self.numberOfMetricsName, len(metrics))
76 def toXML(self, writer, ttFont):
87 def fromXML(self, name, attrs, content, ttFont):
V_O_R_G_.py 12 ttFont['VORG'][<glyphName>] will return the vertical origin for any glyph
13 ttFont['VORG'][<glyphName>] = <value> will set the vertical origin for any glyph.
16 def decompile(self, data, ttFont):
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):
44 nameMap = ttFont.getReverseGlyphMap()
49 nameMap = ttFont.getReverseGlyphMap(rebuild=True)
60 def toXML(self, writer, ttFont):
73 gid = ttFont.getGlyphID(glyphName
    [all...]
E_B_L_C_.py 70 def decompile(self, data, ttFont):
105 indexSubTable = indexFormatClass(data[indexSubHeaderSize:], ttFont)
114 def compile(self, ttFont):
173 glyphIds = list(map(ttFont.getGlyphID, indexSubTable.names))
176 data = indexSubTable.compile(ttFont)
202 def toXML(self, writer, ttFont):
206 curStrike.toXML(curIndex, writer, ttFont)
208 def fromXML(self, name, attrs, content, ttFont):
216 curStrike.fromXML(name, attrs, content, ttFont, self)
231 def toXML(self, strikeIndex, writer, ttFont)
    [all...]
_c_m_a_p.py 22 def decompile(self, data, ttFont):
49 table.decompileHeader(data[offset:offset+int(length)], ttFont)
56 def compile(self, ttFont):
68 chunk = table.compile(ttFont)
77 def toXML(self, writer, ttFont):
81 table.toXML(writer, ttFont)
83 def fromXML(self, name, attrs, content, ttFont):
98 table.fromXML(name, attrs, content, ttFont)
107 self.ttFont = None
121 def decompileHeader(self, data, ttFont)
    [all...]
C_P_A_L_.py 14 def decompile(self, data, ttFont):
30 def compile(self, ttFont):
41 def toXML(self, writer, ttFont):
51 color.toXML(writer, ttFont, cindex)
55 def fromXML(self, name, attrs, content, ttFont):
68 color.fromXML(element[0], element[1], element[2], ttFont)
89 def toXML(self, writer, ttFont, index=None):
93 def fromXML(self, eltname, attrs, content, ttFont):
_s_b_i_x.py 70 def decompile(self, data, ttFont):
86 myBitmapSet.decompile(ttFont)
97 def compile(self, ttFont):
107 myBitmapSet.compile(ttFont)
116 def toXML(self, xmlWriter, ttFont):
122 self.bitmapSets[i].toXML(xmlWriter, ttFont)
124 def fromXML(self, name, attrs, content, ttFont):
132 myBitmapSet.fromXML(name, attrs, content, ttFont)
asciiTable.py 8 def toXML(self, writer, ttFont):
20 def fromXML(self, name, attrs, content, ttFont):
sbixBitmap.py 29 def decompile(self, ttFont):
30 self.glyphName = ttFont.getGlyphName(self.gid)
45 self.referenceGlyphName = ttFont.getGlyphName(gid)
53 def compile(self, ttFont):
57 # TODO: if ttFont has no maxp, cmap etc., ignore glyph names and compile by index?
59 self.gid = struct.pack(">H", ttFont.getGlyphID(self.glyphName))
65 def toXML(self, xmlWriter, ttFont):
91 def fromXML(self, name, attrs, content, ttFont):
99 self.imageData = struct.pack(">H", ttFont.getGlyphID(attrs["glyphname"]))
T_S_I__0.py 16 def decompile(self, data, ttFont):
17 numGlyphs = ttFont['maxp'].numGlyphs
29 def compile(self, ttFont):
47 def toXML(self, writer, ttFont):
  /external/fonttools/Lib/fontTools/ttLib/
macUtils.py 39 """Given a pathname, return a list of TTFont objects. In the case
48 fonts.append(ttLib.TTFont(path))
51 fonts.append(ttLib.TTFont(path, index))
81 def __init__(self, path, ttFont, res_id=None):
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
    [all...]

Completed in 133 milliseconds

1 2