• Home
  • Raw
  • Download

Lines Matching refs:instanceObject

449         for instanceObject in self.documentObject.instances:
450 self._addInstance(instanceObject)
542 def _addInstance(self, instanceObject): argument
544 if instanceObject.name is not None:
545 instanceElement.attrib['name'] = instanceObject.name
546 if instanceObject.familyName is not None:
547 instanceElement.attrib['familyname'] = instanceObject.familyName
548 if instanceObject.styleName is not None:
549 instanceElement.attrib['stylename'] = instanceObject.styleName
551 if instanceObject.localisedStyleName:
552 languageCodes = list(instanceObject.localisedStyleName.keys())
559 localisedStyleNameElement.text = instanceObject.getStyleName(code)
561 if instanceObject.localisedFamilyName:
562 languageCodes = list(instanceObject.localisedFamilyName.keys())
569 localisedFamilyNameElement.text = instanceObject.getFamilyName(code)
571 if instanceObject.localisedStyleMapStyleName:
572 languageCodes = list(instanceObject.localisedStyleMapStyleName.keys())
579 localisedStyleMapStyleNameElement.text = instanceObject.getStyleMapStyleName(code)
581 if instanceObject.localisedStyleMapFamilyName:
582 languageCodes = list(instanceObject.localisedStyleMapFamilyName.keys())
589 localisedStyleMapFamilyNameElement.text = instanceObject.getStyleMapFamilyName(code)
592 if instanceObject.location is not None:
593 … locationElement, instanceObject.location = self._makeLocationElement(instanceObject.location)
595 if instanceObject.filename is not None:
596 instanceElement.attrib['filename'] = instanceObject.filename
597 if instanceObject.postScriptFontName is not None:
598 instanceElement.attrib['postscriptfontname'] = instanceObject.postScriptFontName
599 if instanceObject.styleMapFamilyName is not None:
600 instanceElement.attrib['stylemapfamilyname'] = instanceObject.styleMapFamilyName
601 if instanceObject.styleMapStyleName is not None:
602 instanceElement.attrib['stylemapstylename'] = instanceObject.styleMapStyleName
603 if instanceObject.glyphs:
608 for glyphName, data in sorted(instanceObject.glyphs.items()):
609 … glyphElement = self._writeGlyphElement(instanceElement, instanceObject, glyphName, data)
611 if instanceObject.kerning:
614 if instanceObject.info:
617 if instanceObject.lib:
619 libElement.append(plistlib.totree(instanceObject.lib, indent_level=4))
675 def _writeGlyphElement(self, instanceElement, instanceObject, glyphName, data): argument
928 instanceObject = self.instanceDescriptorClass()
929 instanceObject.path = instancePath # absolute path to the instance
930 instanceObject.filename = filename # path as it is stored in the document
933 instanceObject.name = name
936 instanceObject.familyName = familyname
939 instanceObject.styleName = stylename
942 instanceObject.postScriptFontName = postScriptFontName
945 instanceObject.styleMapFamilyName = styleMapFamilyName
948 instanceObject.styleMapStyleName = styleMapStyleName
954 instanceObject.setStyleName(styleName, lang)
959 instanceObject.setFamilyName(familyName, lang)
964 instanceObject.setStyleMapStyleName(styleMapStyleName, lang)
969 instanceObject.setStyleMapFamilyName(styleMapFamilyName, lang)
972 instanceObject.location = instanceLocation
974 self.readGlyphElement(glyphElement, instanceObject)
976 self.readInfoElement(infoElement, instanceObject)
978 self.readLibElement(libElement, instanceObject)
979 self.documentObject.instances.append(instanceObject)
981 def readLibElement(self, libElement, instanceObject): argument
983 instanceObject.lib = plistlib.fromtree(libElement[0])
985 def readInfoElement(self, infoElement, instanceObject): argument
987 instanceObject.info = True
989 def readKerningElement(self, kerningElement, instanceObject): argument
992 instanceObject.addKerning(kerningLocation)
994 def readGlyphElement(self, glyphElement, instanceObject): argument
1045 instanceObject.glyphs[glyphName] = glyphData