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

Terminus distorted glyphs after patch #86

Closed
lcorsini opened this issue May 16, 2016 · 23 comments · Fixed by #939
Closed

Terminus distorted glyphs after patch #86

lcorsini opened this issue May 16, 2016 · 23 comments · Fixed by #939

Comments

@lcorsini
Copy link

Hello,
Since Terminus doesn't seem to be provided because of some issues in patching the original bdf files,
I tried to use the script to patch this TTF version http://files.ax86.net/terminus-ttf/ which includes at least the basic powerline symbols
the patch works, but the font gets very distorted as you can see in the screenshot (this font is very clear at 12points without antialiasing)

font

any ideas on why this happens?

@ryanoasis
Copy link
Owner

@lcorsini Thanks for the details. Nothing particular is coming to my mind right now but I will try to take a look. 😄

@lcorsini
Copy link
Author

Thanks,
Maybe if there is no particular licensing problem you could include this TTF in your distribution (I use Terminus a Lot, it's one of the best in readability, and this TTF works cross platform even on windows and osx)

FluxAugur pushed a commit to FluxAugur/nerd-fonts that referenced this issue May 25, 2016
Display a warning if the terminal supports less than 256 colors.
FluxAugur pushed a commit to FluxAugur/nerd-fonts that referenced this issue May 25, 2016
@ryanoasis
Copy link
Owner

Yes if the license is fine it would be better to just try to patch the TTF like you have done 😄

As for the issues you mentioned I just haven't gotten around to looking into it yet 😞

@ryanoasis
Copy link
Owner

@lcorsini Can you give more info on the screenshot you provided? What system, editor etc?

This appears to be a problem with the ttf file not the patching. I was able to replicate the very distorted characters without antialiasing turned on, on the original ttf and the patched ttf file.

Another option would be to patch the bitmap fonts but this would require more work, something similar to how https://bitbucket.org/ZyX_I/bitmap-font-patcher works

@lcorsini
Copy link
Author

Ok, in the meantime I moved away from that setup, it was on windows, the editor is vim, and probably this was under putty
The Terminus font is better without antialias and on 12pt that's why I was using it like that

@ryanoasis
Copy link
Owner

@lcorsini Thanks for the details. Yeah I can see that being a bitmap font that would be the typical usage. I am marking this as 'future' as I believe it will take a good amount of effort to be able to patch the bitmap version of this font and I think most people will have antialiasing on.

@quinn-brittain
Copy link

I have the same problem with patched Terminus TTF it looks all distorted.
No matter if I download the pre-patched font or if I patch it myself (using the Terminus TTF that displays correctly).

Unpatched font:
Screen Shot 2019-03-28 at 11 08 17 PM

Patched font:
Screen Shot 2019-03-28 at 10 55 47 PM

System Details:
macOS 10.14.3
iTerm 2 build 3.2.8
zsh (oh-my-zsh powerlevel9k theme)
Terminus TTF
16pt (I've used the unpatched font and it looks fine at this size)
Anti-aliasing disable for both patched and unpatched

@ryanoasis ryanoasis changed the title Distorted glyphs after patch Terminus distorted glyphs after patch Dec 14, 2021
@DoctorKnowsBetter
Copy link

DoctorKnowsBetter commented Sep 22, 2022

I fixed this crap :)
https://github.com/DoctorKnowsBetter/TerminessNerdFont-FixBlur

@Slabity
Copy link

Slabity commented Sep 22, 2022

Nice! Did you make a fix for the font patcher itself or did you end up fixing it manually? Can you get the change pulled into this repo?

@DoctorKnowsBetter
Copy link

I did it manually. The script (font-patcher) does not transfer bitmap layers, I had to create and transfer all bitmap layers from the original Terminus.

@Finii
Copy link
Collaborator

Finii commented Sep 23, 2022

Nice! 👍 @DoctorKnowsBetter

I never ever bothered about bitmap fonts :-}

@Finii
Copy link
Collaborator

Finii commented Sep 23, 2022

@DoctorKnowsBetter
Which option did you use on generate?
image

@Finii
Copy link
Collaborator

Finii commented Sep 23, 2022

Fonts containing bitmaps:

Examining 601 font files
bitmap (11,) (gohufont-11)
bitmap (14,) (gohufont-14)
bitmap (11,) (gohufont-uni-11)
bitmap (14,) (gohufont-uni-14)
bitmap (7, 9, 10, 12, 14, 18, 24) (ProFontIIx)
bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Bold Italic-4.40.1)
bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Bold-4.40.1)
bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Italic-4.40.1)
bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-4.40.1)

Finii added a commit that referenced this issue Sep 23, 2022
[why]
Bitmaps existing in a font are discarded. The font-patcher script just
cares about outline fonts.

[how]
If the sourcefont has bitmaps, do save them into the patched font. Note
that this does not generate bitmaps for the patched-in glyphs (icons).

[note]
Fonts probably affected in src/unpatched-fonts:
    bitmap (11,) (gohufont-11)
    bitmap (14,) (gohufont-14)
    bitmap (11,) (gohufont-uni-11)
    bitmap (14,) (gohufont-uni-14)
    bitmap (7, 9, 10, 12, 14, 18, 24) (ProFontIIx)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Bold Italic-4.40.1)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Bold-4.40.1)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Italic-4.40.1)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-4.40.1)

Fixes: #86

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

Finii commented Sep 23, 2022

Maybe you could try #939 @DoctorKnowsBetter @Slabity ?

@DoctorKnowsBetter
Copy link

@Finii This options:
2022-09-23_13-00

@Finii
Copy link
Collaborator

Finii commented Sep 23, 2022

@DoctorKnowsBetter Thank you. That is what I implemented in #939.

@Finii
Copy link
Collaborator

Finii commented Sep 23, 2022

Seems to work :-)

Previously:

image

With this PR applied...:

image

Now it looks equal.

@Finii
Copy link
Collaborator

Finii commented Sep 23, 2022

Well, I see nothing with my terminal tilix (which probably can do nothing with bitmap fonts).

But here, with Libre writer:

all

  • uninstalled all fonts that are able to supply E61A (checked with fc-list ':charset=e61a'.
  • Install src/unpatched-fonts/Terminus/terminus-ttf-4.40.1/Regular/TerminusTTF-4.40.1.ttf
  • -> Uppermost image
  • Uninstall Terminus and install patched-fonts/Terminus/terminus-ttf-4.40.1/Regular/complete/Terminess\ \(TTF\)\ Nerd\ Font\ Complete.ttf
  • -> Middle image
  • Uninstall Terminess and install newly patched Terminus with this PR in effect
  • -> Bottom image
  • All images 14 pt at 200% maginification after screenshot

But someone should test that with a terminal 😬

@DoctorKnowsBetter
Copy link

@Finii Yes, there is such a problem, some terminals do not see bitmap layers in TTF fonts. Terminals that I use and tested by me (fonts are displayed correctly):

  • xterm;
  • lxterminal;
  • alacritty.

@Finii
Copy link
Collaborator

Finii commented Sep 23, 2022

So the fix works? Then i will merge?

@DoctorKnowsBetter
Copy link

@Finii I guess so. If someone does not display fonts correctly in the terminal, then the issue should be resolved with the developers of this terminal. Most terminals will not have these problems.

@Finii
Copy link
Collaborator

Finii commented Sep 23, 2022

Great! Thanks for testing and for showing your fix! Without it we would not have the PR. ❤️

Finii added a commit that referenced this issue Sep 24, 2022
[why]
Bitmaps existing in a font are discarded. The font-patcher script just
cares about outline fonts.

[how]
If the sourcefont has bitmaps, do save them into the patched font. Note
that this does not generate bitmaps for the patched-in glyphs (icons).

[note]
Fonts probably affected in src/unpatched-fonts:
    bitmap (11,) (gohufont-11)
    bitmap (14,) (gohufont-14)
    bitmap (11,) (gohufont-uni-11)
    bitmap (14,) (gohufont-uni-14)
    bitmap (7, 9, 10, 12, 14, 18, 24) (ProFontIIx)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Bold Italic-4.40.1)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Bold-4.40.1)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Italic-4.40.1)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-4.40.1)

Fixes: #86

Reported-by: DoctorKnowsBetter
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Finii added a commit that referenced this issue Sep 24, 2022
[why]
Bitmaps existing in a font are discarded. The font-patcher script just
cares about outline fonts.

[how]
If the sourcefont has bitmaps, do save them into the patched font. Note
that this does not generate bitmaps for the patched-in glyphs (icons).

[note]
Fonts probably affected in src/unpatched-fonts:
    bitmap (11,) (gohufont-11)
    bitmap (14,) (gohufont-14)
    bitmap (11,) (gohufont-uni-11)
    bitmap (14,) (gohufont-uni-14)
    bitmap (7, 9, 10, 12, 14, 18, 24) (ProFontIIx)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Bold Italic-4.40.1)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Bold-4.40.1)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Italic-4.40.1)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-4.40.1)

Fixes: #86

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

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 Mar 27, 2023
LNKLEO pushed a commit to LNKLEO/Nerd that referenced this issue Nov 24, 2023
[why]
Bitmaps existing in a font are discarded. The font-patcher script just
cares about outline fonts.

[how]
If the sourcefont has bitmaps, do save them into the patched font. Note
that this does not generate bitmaps for the patched-in glyphs (icons).

[note]
Fonts probably affected in src/unpatched-fonts:
    bitmap (11,) (gohufont-11)
    bitmap (14,) (gohufont-14)
    bitmap (11,) (gohufont-uni-11)
    bitmap (14,) (gohufont-uni-14)
    bitmap (7, 9, 10, 12, 14, 18, 24) (ProFontIIx)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Bold Italic-4.40.1)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Bold-4.40.1)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-Italic-4.40.1)
    bitmap (12, 14, 16, 18, 20, 22, 24, 28, 32) (TerminusTTF-4.40.1)

Fixes: ryanoasis#86

Reported-by: DoctorKnowsBetter
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants