Declaration

var layers: [String : GSLayer] { get set }

Declaration

@property (nonatomic, strong) NSDictionary<NSString *,GSLayer *> * layers;

Declaration

pyobjc_instanceMethods.layers() -> dict[str, GSLayer]
pyobjc_instanceMethods.setLayers_(layers: dict[str, GSLayer])

Discussion

A glyph in a font normally has one master layer for each font master and can contain additional Intermediate, Alternative, color, and backup layers. A master layer uses its font master identifier as both its layerId and associatedMasterId. Other layers use a distinct layerId and identify the font master that supplies master-specific values through associatedMasterId.

Layer indexes use the collection’s insertion order. Use sortedLayers()sortedLayerssortedLayers for font master order and setLayer(_:forId:)setLayer:forId:setLayer_forId_ or removeLayer(forId:)removeLayerForId:removeLayerForId_ for individual changes. Do not modify the returned dictionary directly because this bypasses layer ownership, undo, and notifications. When assigning the complete collection, each key must match the corresponding layerId.

See Also

Layers