What is the difference between specifiying and not specifying the stems in this situation? If you don’t specify them, does Glyphs try to infer them by either looking at TTStems or measuring glyphs?
It takes the first H and V stems by default. This snippet should give you an idea how to access them:
for i, stem in enumerate(Font.stems):
print(i, "H" if stem.horizontal else "V")
for m in Font.masters:
print(m.name, ":", list(m.stems))
The stems of a GSFont are GSMetric objects, and you can access its horizontal property. The master-specific values are stored in the GSFontMaster.stems, the order is the same as in GSFont.stems.
Ah yes I remember that now, thank you. But my question is more about what the stem values actually do in the method, since there is a version of the method that doesn’t need stem values. At first I thought it might be to improve the correctThickness option specifically, but I couldn’t figure it out in testing. I assume, though, that if stem values are available and not used (e.g., using doSlantingCorrectionWithAngle_correctContrast_correctShape_correctThickness_checkSelection_ instead of doSlantingCorrectionWithAngle_checkSelection_correctContrast_correctShape_correctThickness_horizontalStem_verticalStem_center_) that Cursify does not do the same thing as when they are explicitly set?
Imagine Cursify is an option amongst a few slanting strategies in a UI:
Bascially, if I’m trying to mimic the defaults of the Glyphs native transform UI, I think correctContrast I would set to True/checked if H and V stems are off by some amount, correctShape and correctThickness I think would default to on, but if I explicity set horizontalStem and verticalStem, does that have an effect on correctContrast (I think it does) or correctShape too and what about correctThickness? In other words, by checking or unchecking “use stems” are there other checkmarks that should toggle along with them? What happens if you use the method where there are no horizontal or vertical stems to set (i.e. if “Use stems” is unchecked here) - does that do something very different to the shape and/or does it make any of the other options useless/uncheckable?
Hopefully that makes more sense and not less
EDIT: Ok, I actually implemented the UI which made testing easier and I see what it’s doing now