In TT Hinting mode, can I snap a point that is outside a zone to this zone? The Snap Point (A) instruction with a named zone is intended for keeping gaps alive, not for snapping to a zone, right? However, is it still possible to snap a point to a zone although the point is slightly outside the zone, without changing the zone or using deltas or using an additional TTFZone or using TTFBlueFuzz? Just for one single point?
Can you show me where you need that?
The bar of my f and t are often lower than the x-height, also in some greek letters this happens. The numbers are sometimes slightly lower than the caps height. Probably there are more cases.
The only way I can think of is with an extra x-height. I’ll think about it.
Yes, that would be the workaround: Add another TTFZone and align it to the x-height. It’s just a bit odd to create an extra zone for 1 or 2 glyphs and to repeat that for several cases. Also, sometimes for one master the glyph is outside the zone and for another inside the original zone. So it would be great to have this function to link a snap point to a zone, similar to choose the named zones.
Agreed. I literally changed the design of my f and t this week, because of the problem Ludwig describes.
Glyphs is trying to put two functionalities into one here, at the cost of making certain things impossible, and leading to unexpected behaviour if you haven’t read the documentation thoroughly. (Plus, the behaviour changed recently, which is also unacceptable.)
Why not introduce a separate type of instruction for a separate goal? Those who do manual TT hinting certainly aren’t afraid of complexity. It’s more important to have all the control you want.
Any news here?
I have used a single point on a zone and link from there for this purpose, in vtt, very long ago. Have not tried in Glyphs.
To clarify: What do you mean by snap to zone. Should the point move onto the zone or just alway keep the same distance?
Can have various purposes, round destination in relation to zone, or round distance down, or round distance with minimum of 1 px.
I’m looking for a way to move a point onto the zone (which is outside the zone).
Since GlyphsApp has changed its behavior and I have many Glyphs files where hints have manually assigned values that are now being handled incorrectly, is there a way to find all Snap (A) and Stem (S) hints that have manual assignments (not auto)?
I tried writing a script to find all characters with hints manually assigned to custom values (not set to Auto), but somehow this information doesn’t seem to be accessible via scripting!?
The zone alignment was never meant to move the point onto the zone and never did. The change is the enforces a minimum distance now.
There is nothing you can’t access with a script. (not even in the app UI. You could move buttons around if you like).
the property you are looking for is called stem (unfortunate name, historic reasons).
So you can use this:
if hint.sten != -2:
print(hint)
Thanks. This only works for stem hint, not for snap (A). what’s the property there?
That should be the same. I did try it with a snap hint.
It only works with the first two zones; zones further down the list are not detected. I used this script:
font = Glyphs.font
glyphs_with_manual_snap = set()
for glyph in font.glyphs:
for layer in glyph.layers:
if not layer.isMasterLayer:
continue
for hint in layer.hints:
if hint.isTrueType and hint.type == 3: # Snap (A)
try:
if hint.stem != -2: # ≠ Auto
glyphs_with_manual_snap.add(glyph.name)
break
except:
continue
if glyphs_with_manual_snap:
print("Glyphen mit Snap (A), die NICHT auf Auto stehen:\n")
for name in sorted(glyphs_with_manual_snap):
print(f"– {name}")
else:
print("Alle Snap (A) Hints stehen auf Auto.")
Indeed the hint.stem property wrapper has a bug. I fixed it. Until I upload the update, use this:
if hint.pyobjc_instanceMethods.stem() < 1000: # ≠ Auto
Thanks.
Nevertheless, I believe that a TrueType hinting function would be very helpful — one that allows a point located outside a zone to be attached to a zone up to a certain pixel size. Deltas are not sufficient here, and in some cases even counterproductive.
still not working with all zones!