Alignment enum from Glyphs3 json schema

Hey!

I have a question concerning the json schema for the .glyphs format 3 files distributed here:

Can anyone explain the meaning of the different values of the alignment enum for a component?

:waving_hand:

From GlyphsCore/GSBase.h:

typedef NS_ENUM(int8_t, GSComponentAlignment) {
	GSAlignmentNoAligned NS_SWIFT_NAME(none) = -2,
	GSAlignmentDisable NS_SWIFT_NAME(disabled) = -1,
	GSAlignmentDefault NS_SWIFT_NAME(default) = 0,
	GSAlignmentForce NS_SWIFT_NAME(forced) = 1,
	GSAlignmentAligned NS_SWIFT_NAME(aligned) = 2,
	GSAlignmentHorizontal NS_SWIFT_NAME(horizontal) = 3,
};
  • GSAlignmentNoAligned: Used internally
  • GSAlignmentDisable: force to not align. stored in the file.
  • GSAlignmentDefault: align based on some rules (code below shouldAlign)
  • GSAlignmentForce: align even if shouldAlign returns NO.
  • GSAlignmentAligned: used internally
  • GSAlignmentHorizontal: align horizontal position but allow vertical movement (useful for e.g. superiors)
1 Like

Thanks for bringing this up, I’ve updated the schemas with descriptions of each case.

1 Like

thanks!