GSCompoent.slant is a tuple of two angles (slantX, slantY), both values are given in degrees.
The slant is a subset of the affine transformation of the component (GSCompoent.transform).
You can get and set the slant of a component.
Generally, slantY is kept at 0 and only slantX is changed. This allows the slant to be reconstructed cleanly in components that also use rotation.
Orientation is not exposed in the UI as it’s still considered experimental, but for guides that are not exported it should be fine to use right now. There are more infos on the orientation property in this topic:
I’ve found a keepWeight property in the component schema. I cannot find a clear link with the Python API or the app in general. Is it a deprecated attribute? If it’s in use, what does influence?
the default value for the alpha attribute of an image is set to 100 in the schema, but the default of a newly initiated GSBackgroundImage obj is 50 (confirmed by the API docs)
the GSBackgroundImage documentation is missing the slant attribute
keepWeight was part of an experimental feature that never shipped, but some files from the trial run of that feature would still carry this attribute, so it’s part of the schema. You can ignore its value as it’s never used.
You are right, that’s a mistake in the schema. There is a limit of 100, but the default is 50. I fixed it.
Any GSTransformable (which are images, but also components, for example) has a slant. This will be part of the reworked API docs.
I’ve noticed a “active” property inside the fontMaster definition in the glyphs 3 format schema. I cannot find an API linked to the data. Is it there for compatibility reasons?
The attrShape schema can store any data, similar to user data. It also exists on shapes like paths and components.
While it can story anything, it’s certainly worthwhile documenting the keys and values that Glyphs uses. I just have not yet come around to collecting that in the schema definition.
Generally, for nodes there is stuff like the stroke thickness and other stroke related infos, for paths there is fill color and other graphic attributes.
I would assume that refers to the icon you can set in Font Info > Masters. The middle icon is Regular. Try setting a different one and then print the attribute again.
Ok, so if I understand correctly these “glyphs”, are a default set of icons baked into the app. Therefore I would expect them to be represented in the glyphs3 schema as an enum with a clear set of names. Florian, what do you think?
Correct, there is a baked-in set of icons that can be referenced in iconName.
I am not sure I would consider it an enum, because Glyphs might very well offer additional icons in a future version and that would not feel like an update of the file format to me. Still, I could add a list of string values that are currently to be expected to the schema docs.
(A custom glyph as icon is stored as a custom parameter, not iconName.)
Also, another thing that caught my attention. If the width of a layer is a required attribute, why does width have a default value? Also, the default is different from the API, if I create a GSLayer() from scratch I get a width of 600upms.