Skip to content

Add X Align [ XALN ] axis #126

Open
Open
@davelab6

Description

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."

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions