Font¶
Must Override¶
- BaseFont._close(**kwargs)[source]¶
This is the environment implementation of
BaseFont.close.Subclasses must override this method.
- BaseFont._generate(format, path, environmentOptions, **kwargs)[source]¶
This is the environment implementation of
BaseFont.generate. format will be a String defining the output format. Refer to theBaseFont.generatedocumentation for the standard format identifiers. If the value given for format is not supported by the environment, the environment must raiseFontPartsError. path will be a String defining the location where the file should be created. It will have been normalized withnormalizers.normalizeFilePath. environmentOptions will be a dictionary of names validated withBaseFont._isValidGenerateEnvironmentOptionnd the given values. These values will not have been passed through any normalization functions.Subclasses must override this method.
- BaseFont._getGuideline(index, **kwargs)[source]¶
This must return a
BaseGuidelineobject. index will be a valid index.Subclasses must override this method.
- BaseFont._get_features()[source]¶
This is the environment implementation of
BaseFont.features. This must return an instance of aBaseFeaturessubclass.Subclasses must override this method.
- BaseFont._get_glyphOrder()[source]¶
This is the environment implementation of
BaseFont.glyphOrder. This must return an Immutable List containing glyph names representing the glyph order in the font. The value will be normalized withnormalizers.normalizeGlyphOrder.Subclasses must override this method.
- BaseFont._get_groups()[source]¶
This is the environment implementation of
BaseFont.groups. This must return an instance of aBaseGroupssubclass.Subclasses must override this method.
- BaseFont._get_info()[source]¶
This is the environment implementation of
BaseFont.info. This must return an instance of aBaseInfosubclass.Subclasses must override this method.
- BaseFont._get_kerning()[source]¶
This is the environment implementation of
BaseFont.kerning. This must return an instance of aBaseKerningsubclass.Subclasses must override this method.
- BaseFont._get_layerOrder(**kwargs)[source]¶
This is the environment implementation of
BaseFont.layerOrder. This must return an Immutable List defining the order of the layers in the font. The contents of the list must be layer names as String. The list will be normalized withnormalizers.normalizeLayerOrder.Subclasses must override this method.
- BaseFont._get_layers(**kwargs)[source]¶
This is the environment implementation of
BaseFont.layers. This must return an Immutable List containing instances ofBaseLayersubclasses. The items in the list should be in the order defined byBaseFont.layerOrder.Subclasses must override this method.
- BaseFont._get_lib()[source]¶
This is the environment implementation of
BaseFont.lib. This must return an instance of aBaseLibsubclass.Subclasses must override this method.
- BaseFont._get_path(**kwargs)[source]¶
This is the environment implementation of
BaseFont.path.This must return a String defining the location of the file or
Noneindicating that the font does not have a file representation. If the returned value is notNoneit will be normalized withnormalizers.normalizeFilePath.Subclasses must override this method.
- BaseFont._init(pathOrObject=None, showInterface=True, **kwargs)[source]¶
Initialize this object. This should wrap a native font object based on the values for pathOrObject:
None
Create a new font.
string
Open the font file located at the given location.
native font object
Wrap the given object.
If showInterface is
False, the font should be created without graphical interface.Subclasses must override this method.
- BaseFont._lenGuidelines(**kwargs)[source]¶
This must return an integer indicating the number of font-level guidelines in the font.
Subclasses must override this method.
- BaseFont._newLayer(name, color, **kwargs)[source]¶
This is the environment implementation of
BaseFont.newLayer. name will be a String representing a valid layer name. The value will have been normalized withnormalizers.normalizeLayerNameand name will not be the same as the name of an existing layer. color will be a Color orNone. If the value is notNonethe value will have been normalized withnormalizers.normalizeColor. This must return an instance of aBaseLayersubclass that represents the new layer.Subclasses must override this method.
- BaseFont._removeGuideline(index, **kwargs)[source]¶
This is the environment implementation of
BaseFont.removeGuideline. index will be a valid index.Subclasses must override this method.
- BaseFont._removeLayer(name, **kwargs)[source]¶
This is the environment implementation of
BaseFont.removeLayer. name will be a String defining the name of an existing layer. The value will have been normalized withnormalizers.normalizeLayerName.Subclasses must override this method.
- BaseFont._save(path=None, showProgress=False, formatVersion=None, fileStructure=None, **kwargs)[source]¶
This is the environment implementation of
BaseFont.save. path will be a String orNone. If path is notNone, the value will have been normalized withnormalizers.normalizeFilePath. showProgress will be aboolindicating if the environment should display a progress bar during the operation. Environments are not required to display a progress bar even if showProgess isTrue. formatVersion will be Integer/Float orNoneindicating the file format version to write the data into. It will have been normalized withnormalizers.normalizeFileFormatVersion.Subclasses must override this method.
- BaseFont._set_glyphOrder(value)[source]¶
This is the environment implementation of
BaseFont.glyphOrder. value will be a list of String. It will have been normalized withnormalizers.normalizeGlyphOrder.Subclasses must override this method.
- BaseFont._set_layerOrder(value, **kwargs)[source]¶
This is the environment implementation of
BaseFont.layerOrder. value will be a list of String representing layer names. The list will have been normalized withnormalizers.normalizeLayerOrder.Subclasses must override this method.
May Override¶
- BaseFont._appendGuideline(position, angle, name=None, color=None, identifier=None, **kwargs)[source]¶
This is the environment implementation of
BaseFont.appendGuideline. position will be a valid Coordinate. angle will be a valid angle. name will be a valid String orNone. color will be a valid Color orNone. This must return the newly createdBaseGuidelineobject.Subclasses may override this method.
- BaseFont._autoUnicodes()[source]¶
This is the environment implementation of
BaseFont.autoUnicodes.Subclasses may override this method.
- BaseFont._clearGuidelines()[source]¶
This is the environment implementation of
BaseFont.clearGuidelines.Subclasses may override this method.
- BaseFont._contains(name, **kwargs)¶
This is the environment implementation of
BaseLayer.__contains__andBaseFont.__contains__This must returnboolindicating if the layer has a glyph with the defined name. name will be a :ref-type-string` representing a glyph name. It will have been normalized withnormalizers.normalizeGlyphName.Subclasses may override this method.
- BaseFont._getItem(name, **kwargs)[source]¶
This is the environment implementation of
BaseFont.__getitem__. name will be a String defining an existing glyph in the default layer. The value will have been normalized withnormalizers.normalizeGlyphName.Subclasses may override this method.
- BaseFont._getLayer(name, **kwargs)[source]¶
This is the environment implementation of
BaseFont.getLayer. name will be a String. It will have been normalized withnormalizers.normalizeLayerNameand it will have been verified as an existing layer. This must return an instance ofBaseLayer.Subclasses may override this method.
- BaseFont._get_guidelines()[source]¶
This is the environment implementation of
BaseFont.guidelines. This must return an Immutable List ofBaseGuidelineobjects.Subclasses may override this method.
- BaseFont._insertGlyph(glyph, name, **kwargs)¶
This is the environment implementation of
BaseLayer.__setitem__andBaseFont.__setitem__. This must return an instance of aBaseGlyphsubclass. glyph will be a glyph object with the attributes necessary for copying as defined inBaseGlyph.copyAn environment must not insert glyph directly. Instead the data from glyph should be copied to a new glyph instead. name will be a String representing a glyph name. It will have been normalized withnormalizers.normalizeGlyphName. name will have been tested to make sure that no glyph with the same name exists in the layer.Subclasses may override this method.
- BaseFont._interpolate(factor, minFont, maxFont, round=True, suppressError=True)[source]¶
This is the environment implementation of
BaseFont.interpolate.Subclasses may override this method.
- BaseFont._isCompatible(other, reporter)[source]¶
This is the environment implementation of
BaseFont.isCompatible.Subclasses may override this method.
- BaseFont._iter(**kwargs)¶
This is the environment implementation of
BaseLayer.__iter__andBaseFont.__iter__This must return an iterator that returns instances of aBaseGlyphsubclass.Subclasses may override this method.
- BaseFont._keys(**kwargs)[source]¶
This is the environment implementation of
BaseFont.keys. This must return an Immutable List of all glyph names in the default layer.Subclasses may override this method.
- BaseFont._len(**kwargs)¶
This is the environment implementation of
BaseLayer.__len__andBaseFont.__len__This must return anintindicating the number of glyphs in the layer.Subclasses may override this method.
- BaseFont._newGlyph(name, **kwargs)[source]¶
This is the environment implementation of
BaseFont.newGlyph. name will be a String representing a valid glyph name. The value will have been tested to make sure that an existing glyph in the default layer does not have an identical name. The value will have been normalized withnormalizers.normalizeGlyphName. This must return an instance ofBaseGlyphrepresenting the new glyph.Subclasses may override this method.
- BaseFont._removeGlyph(name, **kwargs)[source]¶
This is the environment implementation of
BaseFont.removeGlyph. name will be a String representing an existing glyph in the default layer. The value will have been normalized withnormalizers.normalizeGlyphName.Subclasses may override this method.
- BaseFont._round()[source]¶
This is the environment implementation of
BaseFont.round.Subclasses may override this method.