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

New check: consistent underline position and thickness #4203

Open
3 of 7 tasks
dscorbett opened this issue Jul 6, 2023 · 1 comment
Open
3 of 7 tasks

New check: consistent underline position and thickness #4203

dscorbett opened this issue Jul 6, 2023 · 1 comment
Assignees
Labels
New check proposal We expect new check proposals to include a detailed rationale description and a suggested check-id

Comments

@dscorbett
Copy link
Member

dscorbett commented Jul 6, 2023

What needs to be checked?

underlinePosition and underlineThickness in the 'post' table should be consistent with UnderlinePosition and UnderlineThickness in the 'CFF ' table.

Detailed description of the problem

The specification of underlinePosition in 'post' says “The value of the PostScript key may be calculated by subtracting half the underlineThickness from the value of this field.” That is, CFF.UnderlinePosition == post.underlinePosition - post.underlineThickness / 2 by definition.

underlineThickness in 'post' and UnderlineThickness in 'CFF ' are both simply the underline thickness, so they should always equal each other.

Suggested profile

Suggest which profile the check should be added to. The most common are:

  • Vendor-specific: Google Fonts
  • Vendor-specific: Adobe Fonts
  • OpenType (requirements imposed by the OpenType specification)
  • Universal (broadly accepted best practices on the type design community)
  • Other:

Suggested result

Which log result level should the check have:

  • 🔥 FAIL (An issue that must be corrected for the font to function properly)
  • ⚠️ WARN (A potential issues that may need to be addressed)

Severity assessment

1 (minor)

@dscorbett dscorbett added the New check proposal We expect new check proposals to include a detailed rationale description and a suggested check-id label Jul 6, 2023
@felipesanches felipesanches self-assigned this Jul 6, 2023
@felipesanches felipesanches added this to the 0.9.0 milestone Jul 6, 2023
@benkiel
Copy link

benkiel commented Jul 11, 2023

See googlefonts/ufo2ft#764 and unified-font-object/ufo-spec#221 which will make this easier to deal with in sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New check proposal We expect new check proposals to include a detailed rationale description and a suggested check-id
Projects
None yet
Development

No branches or pull requests

3 participants