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: Kerning of tabular glyphs #4440

Closed
2 of 7 tasks
yanone opened this issue Jan 23, 2024 · 1 comment · Fixed by #4448
Closed
2 of 7 tasks

New check: Kerning of tabular glyphs #4440

yanone opened this issue Jan 23, 2024 · 1 comment · Fixed by #4448
Assignees
Labels
New check proposal We expect new check proposals to include a detailed rationale description and a suggested check-id
Milestone

Comments

@yanone
Copy link
Collaborator

yanone commented Jan 23, 2024

What needs to be checked?

Check that tabular glyphs (numerals, mathematic, perhaps some punctuation) show no kerning in combination with all other glyphs

Detailed description of the problem

Extensive font projects can be untidy and accidentally contain kerning of tabular glyphs.

Resources and steps needed to reproduce the problem

This check is conditional on the existence of tabular glyphs in the font.

We need to first find all tabular glyphs, then run shaping of all glyphs in the font with the tabular glyphs to check for existence of kerning. This would include self-intersecting checking of the tabular glyphs against each other, the main point of tabular glyphs. But even regular proportional glyphs shouldn't be kerned with tabular glyphs.

In order to find all tabular glyphs other than numerals,

  • for fonts with a tnum feature I would use all target glyphs of tnum substitutions,
  • for plain fonts without tnum I would first read what the width of the tabular numerals are, if any, then collect all glyphs that show the same width as the tabular glyphs. This might include some false identicals for proportional fonts and thus might cause some false positives for this check. I want to use this wholesale approach rather than limiting tabular glyphs to strictly being numerals or math signs per Unicode definition because a font project may decide for any glyphs to be tabular to be used in a table.

Then, all glyphs in the font combined with all tabular glyphs would be typeset in Harfbuzz and checked for applied kerning.

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

(Classify the problem on a scale of 1 (minor) to 5 (major). How "buggy" would the font be considered if it had the problem described?):

5: broken

@yanone yanone added the New check proposal We expect new check proposals to include a detailed rationale description and a suggested check-id label Jan 23, 2024
@yanone yanone self-assigned this Jan 23, 2024
felipesanches pushed a commit that referenced this issue Jan 26, 2024
Check that tabular numerals and symbols have no kerning.

Added to the Universal Profile
com.google.fonts/check/tabular_kerning
(issue #4440)
felipesanches added a commit that referenced this issue Jan 26, 2024
Check that tabular numerals and symbols have no kerning.

Added to the Universal Profile
com.google.fonts/check/tabular_kerning
(issue #4440)
----

The vharfbuzz and uharfbuzz dependencies are no longer profile-specific, as this new
check that uses them belongs to the Universal profile, so the deps are
now included by default on a vanilla fontbakery installation.
felipesanches added a commit that referenced this issue Jan 26, 2024
Check that tabular numerals and symbols have no kerning.

Added to the Universal Profile
com.google.fonts/check/tabular_kerning
(issue #4440)
----

The vharfbuzz and uharfbuzz dependencies are no longer profile-specific, as this new
check that uses them belongs to the Universal profile, so the deps are
now included by default on a vanilla fontbakery installation.
@yanone yanone linked a pull request Jan 26, 2024 that will close this issue
3 tasks
felipesanches pushed a commit to felipesanches/fontbakery that referenced this issue Jan 30, 2024
Check that tabular numerals and symbols have no kerning.

Added to the Universal Profile
EXPERIMENTAL - com.google.fonts/check/tabular_kerning

(issue fonttools#4440)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Jan 30, 2024
Check that tabular numerals and symbols have no kerning.

Added to the Universal Profile
EXPERIMENTAL - com.google.fonts/check/tabular_kerning

(issue fonttools#4440)
----

The vharfbuzz and uharfbuzz dependencies are no longer profile-specific, as this new
check that uses them belongs to the Universal profile, so the deps are
now included by default on a vanilla fontbakery installation.
felipesanches pushed a commit that referenced this issue Jan 30, 2024
Check that tabular numerals and symbols have no kerning.

Added to the Universal Profile
EXPERIMENTAL - com.google.fonts/check/tabular_kerning

(issue #4440)
felipesanches added a commit that referenced this issue Jan 30, 2024
Check that tabular numerals and symbols have no kerning.

Added to the Universal Profile
EXPERIMENTAL - com.google.fonts/check/tabular_kerning

(issue #4440)
----

The vharfbuzz and uharfbuzz dependencies are no longer profile-specific, as this new
check that uses them belongs to the Universal profile, so the deps are
now included by default on a vanilla fontbakery installation.
@felipesanches felipesanches added this to the 0.11.0 milestone Jan 30, 2024
@juandelperal
Copy link

Hi there

I've noticed that our kerning check is occasionally producing false positives, particularly when examining kerning in tabular numbers.

image

In this case, kerning is present between D and Ž components within the first glyph, but not between DŽ and the numbers. Maybe that's the reason we are getting misleading results.

Thanks!

felipesanches added a commit that referenced this issue Apr 12, 2024
After being marked as **experimental** for 9 weeks since the v0.11.1 release, these checks are now made effective.
For more details, see their previous entries on the changelog.

Made effective on the Open Type profile
  - * **com.typenetwork/check/varfont/ital_range** (PR #4402)
  - * **com.google.fonts/check/varfont/family_axis_ranges** (issue #4554)

Made effective on the Universal profile
  - * **com.google.fonts/check/tabular_kerning** (issue #4440)
  - * **com.google.fonts/check/case_mapping** (issue #3230)
felipesanches added a commit that referenced this issue Apr 12, 2024
After being marked as **experimental** for 9 weeks since the v0.11.1 release, these checks are now made effective.
For more details, see their previous entries on the changelog.

Made effective on the Open Type profile
  - * **com.typenetwork/check/varfont/ital_range** (PR #4402)
  - * **com.google.fonts/check/varfont/family_axis_ranges** (issue #4554)

Made effective on the Universal profile
  - * **com.google.fonts/check/tabular_kerning** (issue #4440)
  - * **com.google.fonts/check/case_mapping** (issue #3230)
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

Successfully merging a pull request may close this issue.

3 participants