Can Objective-C's GSLayer properties be used in Python script?


#1

Objective-C’s GSLayer has properties of vertWidth and vertOrigin. But Python’s GSLayer does not have them. These are required for the proportional vertical width of CJK font. Is it possible to use these in Python script?


#2

Of course:

V = Layer.vertWidth()
Layer.setVertWidth_(V)

#3

Thank you very much! Incidentally request.

  • vertOrigin can not be set in the GUI.
  • It can be set with setVertOrigin_, but the display is incorrect.

Changing to proportional vertical width using vertOrigin and vertWidth in vertical text layout is impossible with Glyphs. If Glyphs responds to vertOrigin in the future, experienced users will be very pleased.


#4

I think that the calculation is incorrect when exporting font file.

  • vmtx.vertOrigin = Ascender - Layer.vertOrigin

This is correct.

  • vmtx.vertOrigin = Ascender + Layer.vertOrigin