(self, ttFont)
| 75 | del self.gid |
| 76 | |
| 77 | def compile(self, ttFont): |
| 78 | if self.glyphName is None: |
| 79 | from fontTools import ttLib |
| 80 | raise ttLib.TTLibError("Can't compile Glyph without glyph name") |
| 81 | # TODO: if ttFont has no maxp, cmap etc., ignore glyph names and compile by index? |
| 82 | # (needed if you just want to compile the mesh table on its own) |
| 83 | self.gid = struct.pack(">H", ttFont.getGlyphID(self.glyphName)) |
| 84 | if self.graphicType is None: |
| 85 | self.rawdata = b"" |
| 86 | else: |
| 87 | self.rawdata = sstruct.pack(meshGlyphHeaderFormat, self) + self.meshData |
| 88 | |
| 89 | def toXML(self, xmlWriter, ttFont): |
| 90 | if self.graphicType == None: |
no outgoing calls
no test coverage detected