Skip to content

Is storing the Italic Angle in Defaults necessary? #2

@Mark2Mark

Description

@Mark2Mark

Glyphs.defaults["com.eweracs.italify.angle"] = Glyphs.font.selectedLayers[0].master.italicAngle

Just a question perhaps: Is this line a) safe and b) necessary?
a) It is possible to open a font with no layer selected. In that case it will store some sort of nil value into the defaults.
b) I looked at the code for all occurrences of this default value, and it never appears to me that it is required to read the angle from the defaults. You can instead always read it from the font when needed, you already default to 0 if it is nil.

What do you think? Could simplify things.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions