Home
last modified time | relevance | path

Searched refs:glyphName (Results 1 – 25 of 51) sorted by relevance

123

/external/fonttools/Lib/fontTools/ttLib/tables/
D_h_m_t_x.py53 glyphName = glyphOrder[i]
58 "an (invalid) negative value?", glyphName, self.advanceName,
60 self.metrics[glyphName] = (advanceWidth, lsb)
63 glyphName = glyphOrder[i + numberOfMetrics]
64 self.metrics[glyphName] = (lastAdvance, sideBearings[i])
69 for glyphName in ttFont.getGlyphOrder():
70 advanceWidth, sideBearing = self.metrics[glyphName]
73 glyphName, self.advanceName))
117 for glyphName in names:
118 advance, sb = self.metrics[glyphName]
[all …]
DC_O_L_R_.py58 for glyphName in glyphNames:
60 gid = ttFont.getGlyphID(glyphName)
62 assert 0, "COLR table contains a glyph name not in ttFont.getGlyphNames(): " + str(glyphName)
63 ordered.append([gid, glyphName, self.ColorLayers[glyphName]])
68 for (gid, glyphName, layers) in ordered:
84 for glyphName in glyphNames:
86 gid = ttFont.getGlyphID(glyphName)
88 assert 0, "COLR table contains a glyph name not in ttFont.getGlyphNames(): " + str(glyphName)
89 ordered.append([gid, glyphName, self.ColorLayers[glyphName]])
104 glyphName = attrs["name"]
[all …]
D_p_o_s_t.py108 glyphName = psName = self.glyphOrder[i]
109 if glyphName == "":
110 glyphName = "glyph%.5d" % i
111 if glyphName in allNames:
113 n = allNames[glyphName]
114 while (glyphName + "#" + str(n)) in allNames:
116 allNames[glyphName] = n + 1
117 glyphName = glyphName + "#" + str(n)
119 self.glyphOrder[i] = glyphName
120 allNames[glyphName] = 1
[all …]
D_h_d_m_x.py86 for glyphName in glyphNames:
90 row.append(widths[glyphName])
91 if ";" in glyphName:
92 glyphName = "\\x3b".join(glyphName.split(";"))
93 writer.write(format % ((glyphName,) + tuple(row)))
114 glyphName = line[0][:-1]
115 if "\\" in glyphName:
117 glyphName = safeEval('"""' + glyphName + '"""')
121 hdmx[ppems[i]][glyphName] = line[i]
DsbixGlyph.py25 …def __init__(self, glyphName=None, referenceGlyphName=None, originOffsetX=0, originOffsetY=0, grap… argument
27 self.glyphName = glyphName
47 self.glyphName = ttFont.getGlyphName(self.gid)
71 if self.glyphName is None:
76 self.gid = struct.pack(">H", ttFont.getGlyphID(self.glyphName))
87 xmlWriter.simpletag("glyph", name=self.glyphName)
92 name=self.glyphName,
D_g_v_a_r.py86 for glyphName in ttFont.getGlyphOrder():
87 glyph = ttFont["glyf"][glyphName]
89 variations = self.variations.get(glyphName, [])
106 glyphName = glyphs[i]
107 glyph = ttFont["glyf"][glyphName]
110 self.variations[glyphName] = decompileGlyph_(
163 for glyphName in ttFont.getGlyphOrder():
164 variations = self.variations.get(glyphName)
167 writer.begintag("glyphVariations", glyph=glyphName)
182 glyphName = attrs["glyph"]
[all …]
DsbixStrike.py62 self.glyphs[current_glyph.glyphName] = current_glyph
75 for glyphName in glyphOrder:
76 if glyphName in self.glyphs:
78 current_glyph = self.glyphs[glyphName]
81 current_glyph = Glyph(glyphName=glyphName)
137 glyphName=myGlyphName,
147 self.glyphs[current_glyph.glyphName] = current_glyph
DV_O_R_G_.py70 for glyphName in glyphNames:
72 gid = ttFont.getGlyphID(glyphName)
74 assert 0, "VORG table contains a glyph name not in ttFont.getGlyphNames(): " + str(glyphName)
75 vOriginTable.append([gid, glyphName, self.VOriginRecords[glyphName]])
92 self.VOriginRecords[vOriginRec.glyphName] = vOriginRec.vOrigin
122 self.glyphName = name
128 writer.simpletag("glyphName", value=self.glyphName)
D_g_l_y_f.py64 glyphName = glyphOrder[i]
67 glyphName = 'ttxautoglyph%s' % i
73 self.glyphs[glyphName] = glyph
94 for glyphName in self.glyphOrder:
95 glyph = self.glyphs[glyphName]
139 for glyphName in glyphNames:
140 glyph = self[glyphName]
144 tounicode(glyphName, 'utf-8'),
162 ("name", glyphName),
179 writer.simpletag('TTGlyph', name=glyphName)
[all …]
DotTables.py564 glyphIDs = [getGlyphID(glyphName) for glyphName in glyphs ]
601 for glyphName in getattr(self, "glyphs", []):
602 xmlWriter.simpletag("Glyph", value=glyphName)
912 for glyphName, cls in classDefs.items():
915 items.append((getGlyphID(glyphName), glyphName, cls))
920 for glyphID, glyphName, cls in items[1:]:
923 ranges.append([cls, glyphID, glyphName])
925 lastName = glyphName
963 for glyphName, cls in items:
964 xmlWriter.simpletag("ClassDef", [("glyph", glyphName), ("class", cls)])
[all …]
DE_B_D_T_.py166 glyphName = attrs['name']
170 …assert glyphName not in bitmapGlyphDict, "Duplicate glyphs with the same name '%s' in the same str…
171 bitmapGlyphDict[glyphName] = curGlyph
260 def _writeRawImageData(strikeIndex, glyphName, bitmapObject, writer, ttFont): argument
270 def _writeRowImageData(strikeIndex, glyphName, bitmapObject, writer, ttFont): argument
301 def _writeBitwiseImageData(strikeIndex, glyphName, bitmapObject, writer, ttFont): argument
344 def _writeExtFileImageData(strikeIndex, glyphName, bitmapObject, writer, ttFont): argument
351 filename = glyphName + bitmapObject.fileExtension
413 def toXML(self, strikeIndex, glyphName, writer, ttFont): argument
414 writer.begintag(self.__class__.__name__, [('name', glyphName)])
[all …]
DT_S_I__5.py36 for glyphName in names:
37 writer.simpletag("glyphgroup", name=glyphName, value=self.glyphGrouping[glyphName])
D_m_a_x_p.py77 for glyphName in ttFont.getGlyphOrder():
78 g = glyfTable[glyphName]
80 if hmtxTable[glyphName][1] != g.xMin:
/external/fonttools/Tests/ufoLib/
DglifLib_test.py31 for glyphName in src.keys():
32 g = src[glyphName]
34 dst.writeGlyph(glyphName, g, g.drawPoints)
36 for glyphName in sorted(src.keys()):
37 fileName = src.contents[glyphName]
52 "%s.glif file differs after round tripping" % glyphName)
75 for glyphName in src.keys():
76 g = src[glyphName]
78 dst.writeGlyph(glyphName, g, g.drawPoints)
87 def myGlyphNameToFileName(glyphName, glyphSet): argument
[all …]
/external/fonttools/Lib/fontTools/ttLib/
DttFont.py508 glyphName = self._makeGlyphName(min(reversecmap[tempName]))
509 numUses = useCount[glyphName] = useCount.get(glyphName, 0) + 1
511 glyphName = "%s.alt%d" % (glyphName, numUses - 1)
512 glyphOrder[i] = glyphName
557 glyphName = self.VIDDict[glyphID]
559 glyphName ="glyph%.5d" % glyphID
561 self.reverseVIDDict[glyphName] = glyphID
562 self.VIDDict[glyphID] = glyphName
563 return glyphName
565 def getGlyphID(self, glyphName, requireReal=False): argument
[all …]
/external/fonttools/Lib/fontTools/ufoLib/
DglifLib.py70 def __init__(self, glyphName, glyphSet): argument
71 self.glyphName = glyphName
85 self.glyphSet.readGlyph(self.glyphName, self, pointPen)
279 def getGLIF(self, glyphName): argument
291 fileName = self.contents[glyphName]
297 "does not exist on %s" % (fileName, glyphName, self.fs)
300 def getGLIFModificationTime(self, glyphName): argument
308 fileName = self.contents[glyphName]
313 def readGlyph(self, glyphName, glyphObject=None, pointPen=None, validate=None): argument
349 text = self.getGLIF(glyphName)
[all …]
/external/fonttools/Snippets/
Dinterpolate.py73 for glyphName in regular.getGlyphOrder():
74 regularCoord = GetCoordinates(regular, glyphName)
75 thinCoord = GetCoordinates(thin, glyphName)
76 blackCoord = GetCoordinates(black, glyphName)
79 glyphName)
84 "control points in all input fonts", glyphName)
94 gvar.variations[glyphName] = [thinVar, blackVar]
97 def GetCoordinates(font, glyphName): argument
104 glyph = glyphTable.glyphs.get(glyphName)
114 horizontalAdvanceWidth, leftSideBearing = font["hmtx"].metrics[glyphName]
/external/fonttools/Lib/fontTools/pens/
DttGlyphPen.py100 def addComponent(self, glyphName, transformation): argument
101 self.components.append((glyphName, transformation))
108 for (glyphName, transformation) in self.components
111 for glyphName, transformation in self.components:
112 if glyphName not in self.glyphSet:
114 "skipped non-existing component '%s'", glyphName
121 self.glyphSet[glyphName].draw(tpen)
125 component.glyphName = glyphName
DpointPen.py203 def addComponent(self, glyphName, transform, identifier=None, **kwargs): argument
205 self.pen.addComponent(glyphName, transform)
265 def addComponent(self, glyphName, transform): argument
267 self.pen.addComponent(glyphName, transform)
336 def addComponent(self, glyphName, transformation, identifier=None, **kwargs): argument
340 self._outPen.addComponent(glyphName, transformation, **kwargs)
420 def addComponent(self, glyphName, transform, identifier=None, **kwargs): argument
422 self.pen.addComponent(glyphName, transform, identifier=identifier, **kwargs)
DbasePen.py109 def addComponent(self, glyphName, transformation): argument
141 def addComponent(self, glyphName, transformation): argument
172 def addComponent(self, glyphName, transformation): argument
177 glyph = self.glyphSet[glyphName]
182 "glyph '%s' is missing from glyphSet; skipped" % glyphName)
DreportLabPen.py51 glyphName = sys.argv[2] variable
55 imageFile = "%s.png" % glyphName
60 g = gs[glyphName]
DteePen.py37 def addComponent(self, glyphName, transformation): argument
39 pen.addComponent(glyphName, transformation)
/external/fonttools/Lib/fontTools/
Dagl.py734 glyphName = tostr(m.group(2))
735 if glyphName in AGL2UV:
737 assert AGL2UV[glyphName] == unicode
739 AGL2UV[glyphName] = unicode
740 UV2AGL[unicode] = glyphName
DfontBuilder.py404 for unicodeValue, variationSelector, glyphName in uvs:
405 if cmapping.get(unicodeValue) == glyphName:
407 glyphName = None
410 uvsDict[variationSelector].append((unicodeValue, glyphName))
476 widths = [gs[glyphName].width for glyphName in gs.keys() if gs[glyphName].width > 0]
514 for glyphName, charString in charStringsDict.items():
517 charStrings[glyphName] = charString
564 for glyphName, charString in charStringsDict.items():
567 charStrings[glyphName] = charString
/external/fonttools/Lib/fontTools/varLib/
D__init__.py213 def _get_phantom_points(font, glyphName, defaultVerticalOrigin=None): argument
215 glyph = glyf[glyphName]
216 horizontalAdvanceWidth, leftSideBearing = font["hmtx"].metrics[glyphName]
222 verticalAdvanceWidth, topSideBearing = font["vmtx"].metrics[glyphName]
245 def _GetCoordinates(font, glyphName, defaultVerticalOrigin=None): argument
252 if glyphName not in glyf.glyphs: return None
253 glyph = glyf[glyphName]
256 control = (glyph.numberOfContours,[c.glyphName for c in glyph.components])
263 phantomPoints = _get_phantom_points(font, glyphName, defaultVerticalOrigin)
270 def _SetCoordinates(font, glyphName, coord): argument
[all …]

123