Layer¶
Must Override¶
- BaseLayer._getItem(name, **kwargs)¶
This is the environment implementation of
BaseLayer.__getitem__andBaseFont.__getitem__This must return an instance of aBaseGlyphsubclass. name will be a String representing a name of a glyph that is in the layer. It will have been normalized withnormalizers.normalizeGlyphName.Subclasses must override this method.
- BaseLayer._get_color()[source]¶
This is the environment implementation of
BaseLayer.color. This must return a Color defining the color assigned to the layer. If the layer does not have an assigned color, the returned value must beNone. It will be normalized withnormalizers.normalizeColor.Subclasses must override this method.
- BaseLayer._get_lib()[source]¶
This is the environment implementation of
BaseLayer.lib. This must return an instance of aBaseLibsubclass.
- BaseLayer._get_name()[source]¶
This is the environment implementation of
BaseLayer.name. This must return a String defining the name of the layer. If the layer is the default layer, the returned value must beNone. It will be normalized withnormalizers.normalizeLayerName.Subclasses must override this method.
- BaseLayer._keys(**kwargs)¶
This is the environment implementation of
BaseLayer.keysandBaseFont.keysThis must return an Immutable List of the names representing all glyphs in the layer. The order is not defined.Subclasses must override this method.
- BaseLayer._newGlyph(name, **kwargs)¶
This is the environment implementation of
BaseLayer.newGlyphandBaseFont.newGlyphThis must return an instance of aBaseGlyphsubclass. name will be a String representing a glyph name. It will have been normalized withnormalizers.normalizeGlyphName. The name will have been tested to make sure that no glyph with the same name exists in the layer.Subclasses must override this method.
- BaseLayer._removeGlyph(name, **kwargs)¶
This is the environment implementation of
BaseLayer.removeGlyphandBaseFont.removeGlyph. name will be a String representing a glyph name of a glyph that is in the layer. It will have been normalized withnormalizers.normalizeGlyphName. The newly createdBaseGlyphmust be returned.Subclasses must override this method.
- BaseLayer._set_color(value, **kwargs)[source]¶
This is the environment implementation of
BaseLayer.color. value will be a Color orNonedefining the color to assign to the layer. It will have been normalized withnormalizers.normalizeColor.Subclasses must override this method.
- BaseLayer._set_name(value, **kwargs)[source]¶
This is the environment implementation of
BaseLayer.name. value will be a String defining the name of the layer. It will have been normalized withnormalizers.normalizeLayerName. No layer with the same name will exist.Subclasses must override this method.
May Override¶
- BaseLayer._autoUnicodes()[source]¶
This is the environment implementation of
BaseLayer.autoUnicodes.Subclasses may override this method.
- BaseLayer._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.
- BaseLayer._init(*args, **kwargs)¶
Subclasses may override this method.
- BaseLayer._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.
- BaseLayer._interpolate(factor, minLayer, maxLayer, round=True, suppressError=True)[source]¶
This is the environment implementation of
BaseLayer.interpolate.Subclasses may override this method.
- BaseLayer._isCompatible(other, reporter)[source]¶
This is the environment implementation of
BaseLayer.isCompatible.Subclasses may override this method.
- BaseLayer._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.
- BaseLayer._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.
- BaseLayer._round()[source]¶
This is the environment implementation of
BaseLayer.round.Subclasses may override this method.