Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add X Align [ XALN ] axis #126

Open
2 tasks done
davelab6 opened this issue Mar 17, 2023 · 8 comments
Open
2 tasks done

Add X Align [ XALN ] axis #126

davelab6 opened this issue Mar 17, 2023 · 8 comments
Labels
---Approved. Valid for PR Axis is ready to create a PR --new-axis New variable axis definition

Comments

@davelab6
Copy link
Member

davelab6 commented Mar 17, 2023

Requirements

Similar to the Vertical Alignment [YALN] axis discussed in #106 and added in #125 there ought to be a similar design

  • I have inspected the current Axis Registry and there is not a registered custom axis that could be used for the variation purpose on the upcoming font project.
  • The metadata fields of the proposed axis meet the Axis Requirements as specified in the Protocol (linked above).

Font project(s) using the axis

Google Sans Clock is a proprietary font made by Font Bureau for Google Pixel phone lockscreen clock faces, and so has not been needed in the fonts CSS API. It has a similar axis to YALN with a different name, "Swing" (SWNG). We may use this kind of variation in another upcoming font that will be needed in the CSS API, so I am filing this issue following my approval of YALN to flesh out the system of axes that it implies.

Swing was ranged -50 to +50 with default 0, but I think using 100 values as percent is better, so I'm starting with that, and hope @dberlow can comment :)

Short description of what the axis does

"Align glyphs horizontally from their default position to the left (-100%) with zero left sidebearing, or to the right (100%) with zero right sidebearing."

Image

XALN

Why is the axis needed

When laying out a clock like this, it is useful to be able to customize the exact horizontal position of the glyphs so they are perfectly balanced visually. An axis allows this fine configuration of the layout within the glyph boxes, with no reflow, or overly complex code at the document level.

HH
MM

Axis metadata fields

(Remove this line and fill out the mock of the data structure of the axis)

#XALN based on Google Sans Clock
tag: "XALN"
display_name: "X Alignment"
min_value: -100
default_value: 0
max_value: 100
precision: 0
fallback {
  name: "Default"
  value: 0
}
fallback_only: false
description:
  "Align glyphs horizontally from their default position"
  " to the left (-100%) with zero left sidebearing, or"
  " to the right (100%) with zero right sidebearing."
@davelab6 davelab6 added the --new-axis New variable axis definition label Mar 17, 2023
@dberlow
Copy link

dberlow commented Mar 19, 2023 via email

@davelab6
Copy link
Member Author

davelab6 commented Mar 22, 2023

I was basing the % range off the YALN, and I forgot that SWNG was per-mille. The justification of per-mille being better here to allow programmability is a good one, and also that one can derive a per-cent from a per-mille value but not the other way around. Should YALN also be per-mille? See #106

@davelab6
Copy link
Member Author

@vv-monsalve suggested an axis name of [XALN] Horizontal Glyph Alignment for this per-mille version of the [XELA] Horizontal Element Alignment per-cent axis.

@vv-monsalve
Copy link
Contributor

Perhaps the tag will need to reflect the "Glyph" portion of the name.
XGAL XGPA?

@davelab6
Copy link
Member Author

Because it allies globally to all glyphs, and all parts of all glyphs, it seems fine to elide :)

@vv-monsalve
Copy link
Contributor

Last agreed definitions for this axis.

Axis metadata fields

#XGAL based on Google Sans Clock
tag: "XALN"
display_name: "Horizontal Alignment"
min_value: -100
default_value: 0
max_value: 100
precision: -1
fallback {
  name: "Default"
  value: 0
}
fallback_only: false
description:
  "Align glyphs horizontally from their default position"
  " to the left (-100%) with zero left sidebearing, or"
  " to the right (100%) with zero right sidebearing."

@dberlow
Copy link

dberlow commented Jan 28, 2024 via email

@davelab6
Copy link
Member Author

@dberlow yes we can mention it on the glossary page :)

@vv-monsalve vv-monsalve added the ---Approved. Valid for PR Axis is ready to create a PR label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
---Approved. Valid for PR Axis is ready to create a PR --new-axis New variable axis definition
Projects
None yet
Development

No branches or pull requests

3 participants