Skip to content

Set vertical metrics for better vertical centering in UI elements #273

@arrowtype

Description

@arrowtype

Goal: set vertical metrics so that caps are perfectly vertically-centered.

This was done by setting the OS2TypoAscender and HheaAscender to 950, which sets the default "text" box in most apps so that the top is 250 units away from the cap height, which mirrors the value of 250 away from the baseline, set by descenders.

The winAscent value wasn't changed, because it should stay larger to prevent diacritics from being cut off in apps such as MS Word. (This still needs further testing).

https://github.com/arrowtype/recursive/blob/7f44c38836fbce2f368a3322ee005471c802f851/src/01-shell-scripts-for-sources/metrics/set-v_metrics.py

The images below show the result of the changed vertical metrics in the default layout of Recursive in Sketch, on macOS. This uses CoreText, the default text rendering on Mac, so the results will be similarly improved in apps like Keynote, etc.

image

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed in sourcesIssue is resolved in sources and is awaiting new build + release.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions