-
Notifications
You must be signed in to change notification settings - Fork 105
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
glyphs/case mapping between caps and lowercases #3230
Comments
Agreed, this is EXTREMELY important, and should be quite simple to implement. |
@RosaWagner mentioned "very few exceptions". Can we come up with a list of them all? |
It looks like maybe this Unicode chart is a start? https://www.unicode.org/charts/case/chart_NoCaseMapping.html Defined as the following:
Also relevant from the Unicode case mapping docs:
It might be possible to pull these data out of the ICU lib using something like |
The Python >>> case_str = "A"
>>> nocase_str = "1"
>>> case_str.islower()
False
>>> case_str.isupper()
True
>>> case_str.istitle()
True
>>> nocase_str.islower()
False
>>> nocase_str.isupper()
False
>>> nocase_str.istitle()
False |
To what @chrissimpkins mentioned I would add another exception:
|
I suspect we won't need an exception list. The python unicode methods seem to be enough for the task. |
Also, I think this check is sufficiently generic to be included as a FAIL in the Universal profile. |
Here's how it will look on a markdown report: 🔥 FAIL: Ensure the font supports case swapping for all its glyphs. (com.google.fonts/check/case_mapping)
[code: missing-case-counterparts] |
Here's where perhaps we could see if we want to add exceptions. But for that I think we would need some statistics on which are the most common missing case-mapping counterparts. I'll try to come up with the numbers. |
These are the most common occurrences on the Google Fonts library (the first number indicates how many times fontbakery detected that specific missing case-mapping counterpart):
|
Ensure that no glyph lacks its corresponding upper or lower counterpart (but only when unicode supports case-mapping). com.google.fonts/check/case_mapping (EXPERIMENTAL) Added to the Universal profile. (issue fonttools#3230)
But we need to inspect them more carefully (issue fonttools#3230)
Ensure that no glyph lacks its corresponding upper or lower counterpart (but only when unicode supports case-mapping). com.google.fonts/check/case_mapping (EXPERIMENTAL) Added to the Universal profile. (issue fonttools#3230)
But we need to inspect them more carefully (issue fonttools#3230)
Ensure that no glyph lacks its corresponding upper or lower counterpart (but only when unicode supports case-mapping). com.google.fonts/check/case_mapping (EXPERIMENTAL) Added to the Universal profile. (issue fonttools#3230)
Ensure that no glyph lacks its corresponding upper or lower counterpart (but only when unicode supports case-mapping). com.google.fonts/check/case_mapping (EXPERIMENTAL) Added to the Universal profile. (issue #3230)
That one as an exception doesn’t make sense. The likely reason the uppercase Ÿ is missing in many fonts may be because ÿ is in the Latin Extended A block which most Latin fonts cover and the uppercase is in the Latin Extended B block which most fonts do not cover. |
@felipesanches @simoncozens This should be reopened. The exceptions are inconsistent or should raise a WARN. There are roughly orthographic characters, phonetic characters and historical characters. The orthographic, phonetic and historical sometimes overlap, for example the lowercase is phonetic and the uppercase is historical, or the lowercase is For example:
The fontbakery check should likely check if a case-pair is orthographic (for example reported by shaperglot as such), then either FAIL or at least WARN. For the FAIL there could be some heuristic like whether the character is decomposable with |
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)
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)
For example, a font I am trying to onboard has
Ydieresis
, but notydieresis
.We need a case mapping check cause if someone capitalises ÿ… then there won't be any Ÿ.
We could have the same with small caps too.
There will be few exception like
Dz
, which doesn't have a lowercase relative.The text was updated successfully, but these errors were encountered: