-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Atkinson hyperlegible mono #1802
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
Atkinson hyperlegible mono #1802
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes: #1799
Weights are ExtraLight / Light / Regular / Medium / SemiBold / Bold / ExtraBold; as usual I would try to reduce the set and not include weights that are rather unlikely in terminal use.
Nice PR!
No that is a fontforge message we can not suppress. |
Remove `Extra*` and `Semi*` fonts
Avoid errors due to font name length
[why] Not sure we need this, but if we have it it should be up to date. [how] Update from fonts.json and also add instructions for update for future reference. Signed-off-by: Fini Jastrow <[email protected]>
Checking... $ fontforge font-patcher --debug 2 --dry ~/Downloads/AtkinsonHyperlegibleMono-ExtraLightItalic.otf 2>/dev/null
Nerd Fonts Patcher v3.3.0-75 (4.18.1) (ff 20230101)
DEBUG: Naming mode 1
DEBUG: Monospace check: Panose is invalid ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); glyph-width-mono True
INFO: Setting Panose 'Family Kind' to 'Latin Text and Display' (was 'Any')
INFO: Setting Panose 'Proportion' to 'Monospaced' (was 'Any')
WARNING: Font vertical metrics inconsistent (HHEA 1157 / TYPO 1197 / WIN 1407), using WIN
DEBUG: Font has negative right side bearing in extended glyphs
DEBUG: Final font cell dimensions 632 w x 1407 h
Done with Patch Sets, generating font...
DEBUG: Weight approximations: OS2/PS/Name: 200/200/200 (from 200/'ExtraLight'/'ExtraLight')
ERROR: ====-< Family (ID 1) too long (33 > 31): AtkynsonMono Nerd Font ExtraLight
DEBUG: =====> SubFamily (ID 2) ok ( 6 <=31): Italic
DEBUG: =====> Fullname (ID 4) ok (40 <=63): AtkynsonMono Nerd Font ExtraLight Italic
DEBUG: =====> PSN (ID 6) ok (31 <=63): AtkynsonMonoNF-ExtraLightItalic
DEBUG: =====> PrefFamily (ID 16) ok (22 <=31): AtkynsonMono Nerd Font
DEBUG: =====> PrefStyles (ID 17) ok (17 <=31): ExtraLight Italic
DEBUG: =====> Filename 'AtkynsonMonoNerdFont-ExtraLightItalic.otf' Ok, Metrics needs investigation. Why is it using WIN, I have forgotten everything, but this feels wrong. Results in next comment. |
Metrics $ ttx -o - AtkinsonHyperlegibleMono-ExtraLightItalic.otf 2>/dev/null | grep '[xy]M[ai][xn] '
<xMin value="-66"/>
<yMin value="-231"/>
<xMax value="1223"/>
<yMax value="872"/> 1223 + 66 = 1289 😬 $ font-line report AtkinsonHyperlegibleMono-ExtraLightItalic.otf
=== AtkinsonHyperlegibleMono-ExtraLightItalic.otf ===
Version 2.001;Glyphs 3.2.3 (3260)
SHA1: 1c575120b410da299e4f70d99bce1e68c6ba6af7
::::::::::::::::::::::::::::::::::::::::::::::::::
Metrics
::::::::::::::::::::::::::::::::::::::::::::::::::
[head] Units per Em: 1000
[head] yMax: 872
[head] yMin: -231
[OS/2] CapHeight: 668
[OS/2] xHeight: 496
[OS/2] TypoAscender: 796
[OS/2] TypoDescender: -251
[OS/2] WinAscent: 996
[OS/2] WinDescent: 411
[hhea] Ascent: 796
[hhea] Descent: -161
[hhea] LineGap: 200
[OS/2] TypoLineGap: 150
::::::::::::::::::::::::::::::::::::::::::::::::::
Ascent to Descent Calculations
::::::::::::::::::::::::::::::::::::::::::::::::::
[hhea] Ascent to Descent: 957
[OS/2] TypoAscender to TypoDescender: 1047
[OS/2] WinAscent to WinDescent: 1407
::::::::::::::::::::::::::::::::::::::::::::::::::
Delta Values
::::::::::::::::::::::::::::::::::::::::::::::::::
[hhea] Ascent to [OS/2] TypoAscender: 0
[hhea] Descent to [OS/2] TypoDescender: -90
[OS/2] WinAscent to [OS/2] TypoAscender: 200
[OS/2] WinDescent to [OS/2] TypoDescender: 160
::::::::::::::::::::::::::::::::::::::::::::::::::
Baseline to Baseline Distances
::::::::::::::::::::::::::::::::::::::::::::::::::
hhea metrics: 1157
typo metrics: 1197
win metrics: 1407
[OS/2] fsSelection USE_TYPO_METRICS bit set: True
::::::::::::::::::::::::::::::::::::::::::::::::::
Ratios
::::::::::::::::::::::::::::::::::::::::::::::::::
hhea metrics / UPM: 1.16
typo metrics / UPM: 1.2
win metrics / UPM: 1.41 😭 Even the gap differs. Examining which looks best, as we can not achieve identical look on all-platforms with this metrics (the unpatched font will look already different on different platforms) 😒 Probably we should go with TYPO, as it is only slightly bigger than HHEA, and WIN is clearly wrong. Then we have these comments in the code if not self.args.metrics:
# We use either TYPO (1) or WIN (2) and compare with HHEA
# and use HHEA (0) if the fonts seems broken - no WIN, see #1056
our_btb = typo_btb if use_typo else win_btb
if our_btb == hhea_btb:
metrics = Metric.TYPO if use_typo else Metric.WIN # conforming font
elif abs(our_btb - hhea_btb) / our_btb < 0.03:
logger.info("Font vertical metrics slightly off (%.1f%%)", (our_btb - hhea_btb) / our_btb * 100.0)
metrics = Metric.TYPO if use_typo else Metric.WIN
else:
# Try the other metric
our_btb = typo_btb if not use_typo else win_btb
if our_btb == hhea_btb:
use_typo = not use_typo
logger.warning("Font vertical metrics probably wrong USE TYPO METRICS, assume opposite (i.e. %s)", repr(use_typo))
self.sourceFont.os2_use_typo_metrics = 1 if use_typo else 0
metrics = Metric.TYPO if use_typo else Metric.WIN
else:
# We trust the WIN metric more, see experiments in #1056
logger.warning("Font vertical metrics inconsistent (HHEA %d / TYPO %d / WIN %d), using WIN", hhea_btb, typo_btb, win_btb)
our_btb = win_btb
metrics = Metric.WIN Ah, Will add a commit that switches to TYPO. |
[why] The automatic metrics chooser comes up with the wrong metric (WIN) because the allowed difference of TYPO and HHEA (which is 3%) is slightly missed here with 3.3%. [how] Manually select TYPO metrics. [note] See discussion in ryanoasis#1802 Signed-off-by: Fini Jastrow <[email protected]>
Hmm, Atkinson is missing from Maybe we should finally drop the old stuff and use the new renaming table also for the legacy naming mode. 🤔 I'll do a force push now, to get rid of the fonts you removed (squashing bot commits). Because otherwise the removed fonts will be in the repo still, adding to the size. You know how to get your local repo in sync? (No need to answer with: yes ;) |
3314e56
to
6e74c18
Compare
Is there a specific reason you use the The Will check the feature set. |
No, it was just because they were in the root directory. |
$ ./gotta-patch-em-all-font-patcher\!.sh -j Atkinson
# [Nerd Fonts] Filter given, limiting search and patch to filename pattern 'Atkinson'
# [Nerd Fonts] Total source fonts found: 8
# [Nerd Fonts] Release timestamp is Fri, 21 Feb 2025 10:13:31 +0100
# [Nerd Fonts] Processing font 1/8
# [Nerd Fonts] Processing font 2/8
# [Nerd Fonts] Processing font 3/8
# [Nerd Fonts] Processing font 4/8
# [Nerd Fonts] Processing font 5/8
# [Nerd Fonts] Processing font 6/8
# [Nerd Fonts] Processing font 7/8
# [Nerd Fonts] Processing font 8/8
Nerd Fonts Patcher v3.3.0-77 (4.18.1) (ff 20230101)
INFO: Adding config commandline options: --makegroups 4 --metrics TYPO
... Well, the cell center is about the x-height-center, which is ok I guess. 🤔 Would be a nice new debug value, x-height-center, cell-center, cap-center |
Will pull shortly before the release, as the website is updated instantly and that would point to a non-existing release file 😬 Thanks again |
@allcontributors please add @joshestein for code |
I've put up a pull request to add @joshestein! 🎉 |
Implemented and merged in 1462317 |
[why] This flag has been introduced meanwhile, so all new fonts should set it. Signed-off-by: Fini Jastrow <[email protected]>
Can't wait to have this! Thank you, guys, for putting the time. I love this font |
Description
Adds Atkinson Hyperlegible Mono font.
Requirements / Checklist
Issue number where discussion took place: #xxx
What does this Pull Request (PR) do?
Adds new font. I've only patched the mono font. Source: https://www.brailleinstitute.org/freefont/
How should this be manually tested?
Run
gotta-patch-em-all-font-patcher!.sh
and inspect the fonts.When I open the patched fonts in FontForge I am seeing this error:
I'm not sure if this is something to worry about?
Fixes: #1799
Edit Finii: Add fix link