Visitar URL original
Read the Family Alignment Zones parameter as postscriptFamilyBlues and postscriptFamilyOtherBlues by lehni · Pull Request #1215 · googlefonts/glyphsLib · GitHub
Skip to content

Read the Family Alignment Zones parameter as postscriptFamilyBlues and postscriptFamilyOtherBlues - #1215

Merged
anthrotype merged 1 commit into
googlefonts:mainfrom
lehni:family-alignment-zones
Oct 31, 2026
Merged

anthrotype merged 1 commit into
googlefonts:mainfrom
lehni:family-alignment-zones

Conversation

@lehni

@lehni lehni commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Glyphs' font-wide "Family Alignment Zones" parameter is not read today: it ends up in the UFO lib, and fonts built with fontmake have no FamilyBlues. This splits its zones as the alignment zones of a master are split (zones below the baseline go to postscriptFamilyOtherBlues). It reads both the Glyphs 2 form ("{pos, size}" strings) and the Glyphs 3 form ({pos, size} dicts).

  • blues_from_alignment_zones() in blue_values.py is now shared by the master zones and this parameter, as the TODO in custom_params.py suggests.
  • The explicit postscriptFamilyBlues / postscriptFamilyOtherBlues parameters still take precedence, and still carry the values back to Glyphs. A Glyphs → UFO → Glyphs round trip therefore writes the zones as those two parameters rather than as "Family Alignment Zones".

@google-cla

google-cla Bot commented Oct 28, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@lehni
lehni force-pushed the family-alignment-zones branch from b4994bf to 4280ffa Compare October 28, 2026 16:18
@lehni

lehni commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

The Regression Tests failure is the intended change: JetBrains Mono uses "Family Alignment Zones", so each of its 6 master UFOs now gets postscriptFamilyBlues and postscriptFamilyOtherBlues (e.g. -10 0 550 560 730 740 830 840), and the raw parameter no longer lands in the UFO lib. No other test font changes.

@anthrotype anthrotype left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good!

One thing about the round trip though. Glyphs.app ignores the postscriptFamilyBlues/postscriptFamilyOtherBlues custom parameters (I checked with a native 3.5 export), so after Glyphs -> UFO -> Glyphs the file no longer has any family blues as far as Glyphs is concerned.

On main the original "Family Alignment Zones" parameter survives in the UFO lib, so this would be a regression for anyone exporting a round-tripped file from Glyphs.

Maybe the FamilyAlignmentZonesParamHandler.to_glyphs could rebuild the zones from the family blues instead, as to_glyphs_blue_values does for the master zones, and the two postscriptFamily* handlers would no longer write them to Glyphs as custom parameters. A round-trip test would be good too. Happy to merge after that.

@lehni
lehni force-pushed the family-alignment-zones branch from 4280ffa to 2e80e6c Compare October 30, 2026 20:40
@lehni

lehni commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review! I've addressed it now: FamilyAlignmentZonesParamHandler.to_glyphs rebuilds the zones from the family blues (sharing the conversion with to_glyphs_blue_values), and the postscriptFamily* handlers no longer write custom parameters to Glyphs. Added a round-trip test.

@anthrotype
anthrotype merged commit c76dde7 into googlefonts:main Oct 31, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants