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

AnonymousPro: Still blurred fonts #1174

Closed
im-n1 opened this issue Apr 20, 2023 · 15 comments
Closed

AnonymousPro: Still blurred fonts #1174

im-n1 opened this issue Apr 20, 2023 · 15 comments
Milestone

Comments

@im-n1
Copy link

im-n1 commented Apr 20, 2023

Back then I reported this issue. Today I tried new fonts (2 months old) and there is a certain advance but the result is not perfect. See:

Original Anonymous Pro
not_nerd

Patched version
nerd

Sizing and spacing seems good but the font is lil bit blurred out and faded.
Terminal: Alacritty 0.12

@Finii
Copy link
Collaborator

Finii commented Apr 20, 2023

The patched from font originates where? Release package, self patched, ...?

Edit: Correct typo

@Finii
Copy link
Collaborator

Finii commented Apr 20, 2023

Maybe the font is too old. Multiple bugs tackling baseline-to-baseline spacing and also regarding hinting/antialiasing have been fixed for v3.0.0 which is about to be released. Maybe I should provide you with a new version that you can test. Then I do not need to replicate your issue with an old font and test if it has been fixed with v3.0.0. For that I would need to install your client, etc pp (time maybe better spent with preparing the pending release).

@Finii Finii changed the title Still blurred fonts AnonymousPro: Still blurred fonts Apr 21, 2023
@Finii
Copy link
Collaborator

Finii commented Apr 21, 2023

Is 'Original Anonymous Pro' our source or the real source? Because I just noticed we patch a patched version 🙄

@Finii
Copy link
Collaborator

Finii commented Apr 21, 2023

Obviously the font we use as source is a Anonymous Pro Minus variant.

Interestingly the Minus variant (without embedded bitmaps) is available as 1.003 while the ttf with bitmaps in only availabe as 1.002.

I would update our source to the original source. The question remains if you used a self patched font (from the original source), or a pre-patched font? I see that a lot of settings are lost in our source (all the stuff that fontforge does not preserver and that we now post-patch copy over from the source font in the 'tweak' stage.

I guess I have a build-from-source alacritty somewhere... searching

@Finii
Copy link
Collaborator

Finii commented Apr 21, 2023

Hmm, can not reproduce

image
Top: Original Anonymous Pro 1.002; bottom: Anonymice Pro Nerd Font v2.3.3

Your images looks like one font is rendered with antialiasing and the other without. Maybe.

@im-n1
Copy link
Author

im-n1 commented Apr 21, 2023

@Finii

  1. i use patched font from this repo - master branch
  2. try smalles sizes maybe?
  3. my original (the sharp and non patched version) is this one - you can try to patch it by yourself and we will see

@Finii
Copy link
Collaborator

Finii commented Apr 21, 2023

Regarding 3... I just tried to exchange the Anonymous Pro to the real repo (https://www.marksimonson.com/fonts/view/anonymous-pro), but that font triggers a bug in fontforge :-( fontforge/fontforge#5230

So now I started to debug fontforge ...
Maybe I should stop that soon, and continue on with 3.0.0 🤔

Finii added a commit that referenced this issue Apr 21, 2023
[why]
We use a prepatched font not the original Anonymous Pro.
The prepatched font contains no bitmaps and is thus like
Anonymous Pro Minus. Also some font internals that fontforge does not
copy out of the box are differing.

And we miss the Bold and Italic variants.

[how]
Crossgrade to original Anonymous Pro as source and add the missing
weight/style.

Add Anonymous to SIL.
Handle 'Pro' naming parts (do not detect 'r' as short for 'Regular').

[note]
Maybe related: #1174

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii Finii mentioned this issue Apr 21, 2023
2 tasks
@Finii
Copy link
Collaborator

Finii commented Apr 21, 2023

The embedded bitmaps almost certainly are destroyed by fontforge...:

image

Looks good otherwise.

@im-n1
Copy link
Author

im-n1 commented Apr 21, 2023

So the issue is in fonrforge which means you cant do anything about that?

@Finii
Copy link
Collaborator

Finii commented Apr 21, 2023

No, at least I do not believe that. When I use the original Anonymous Pro alacritty says something contradicting regarding bitmaps...:

image

I'm not sure what that means. Anyhow, the bitmaps are only in sizes 10..13, and I guess you see the problem also with bigger sizes? Your screenshot looks like bigger size.

I have very limited knowledge about bitmap fonts, while according to #329 you have :-)
So from the looks it seems that the bitmaps are broken (if the bitmaps are used in your setup).
I have no clue how it should look like in alacritty -vvv when bitmaps are used, and/or how I enforce bitmaps, etc pp.
I have a problem with alacritty anyhow, the usual executables do not run on my machine - that is the reason why I self-built that thing. Maybe it's my unsupported graphics 🤷‍♀️

Before commit 946c1d0 font-patcher was not even able to preserve bitmaps at all.
That is in v2.3.0-RC, so it should be in the fonts you downloaded. Ah no, the source did not contain bitmaps.

I can prepare you a new AnonymicePro Nerd Font v3.0.0 that you could check. Because that will really include bitmaps, maybe that will be the difference then. Or do you see the effect also with bigger sizes, beyond bitmaps?

As I showed, I can not see the effect right now.
I believe you are on Arch, maybe I remember wrongly. What you could try is changing the antialiasing and hinting settings - although I do not know if alacritty even obeys them. Maybe that will point us in the right direction.

And/or it would be helpful to check if the effect is also there in other applications. Other terminals and also text processors like writer.

image
Antialias and Hinting settings for Gnome

Finii added a commit to Finii/nerd-fonts that referenced this issue Apr 21, 2023
See ryanoasis#1174

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii
Copy link
Collaborator

Finii commented Apr 21, 2023

Please find the patched-with-bitmaps fonts here: https://github.com/Finii/nerd-fonts/tree/master/patched-fonts/AnonymousPro

@Finii
Copy link
Collaborator

Finii commented Apr 21, 2023

Some tables are missing after patching, and EBDT (Embedded Bitmap Data Table) is smaller 🙄

image

@Finii
Copy link
Collaborator

Finii commented Apr 21, 2023

Had a look at your screenshot in huge magnification...
This for sure looks like hinting hitting you...

image
Bottom-right: Original font. Click to enlarge

Patching did not show a baseline-to-baseline metrics warning, so that is probably also solved meanwhile.

@Finii Finii added this to the v3.0.2 milestone Jun 2, 2023
@Finii
Copy link
Collaborator

Finii commented Jun 4, 2023

Already did the change to bitmap embedded Anonymous Pro with #1175.

Please check after v3.0.2 if that has been improved.

Closing for now.

@Finii Finii closed this as completed Jun 4, 2023
LNKLEO pushed a commit to LNKLEO/Nerd that referenced this issue Nov 24, 2023
[why]
We use a prepatched font not the original Anonymous Pro.
The prepatched font contains no bitmaps and is thus like
Anonymous Pro Minus. Also some font internals that fontforge does not
copy out of the box are differing.

And we miss the Bold and Italic variants.

[how]
Crossgrade to original Anonymous Pro as source and add the missing
weight/style.

Add Anonymous to SIL.
Handle 'Pro' naming parts (do not detect 'r' as short for 'Regular').

[note]
Maybe related: ryanoasis#1174

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Copy link
Contributor

github-actions bot commented Dec 4, 2023

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants