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

Ubuntu Nerd Font having issues with ligatures displaying fi and fl wrong again #1221

Closed
3 tasks done
quantenzitrone opened this issue May 10, 2023 · 13 comments · Fixed by #1223
Closed
3 tasks done

Ubuntu Nerd Font having issues with ligatures displaying fi and fl wrong again #1221

quantenzitrone opened this issue May 10, 2023 · 13 comments · Fixed by #1223

Comments

@quantenzitrone
Copy link

quantenzitrone commented May 10, 2023

🗹 Requirements

  • I have searched the issues for my issue and found nothing related and/or helpful
  • I have searched the FAQ for help
  • I have searched the Wiki for help

🎯 Subject of the issue

Experienced behavior:
fi and fl are displayed as nf-fa-music and nf-fa-search

Expected behavior:
normal displaying of fi and fl

🔧 Your Setup

  • Which font are you using (e.g. Anonymice Powerline Nerd Font Complete.ttf)?
    • Ubuntu Nerd Font
  • Where did you get the file from (download link, self patched, source downloaded from link...)
    • Nixpkgs
  • Which terminal emulator are you using (e.g. iterm2, urxvt, gnome, konsole)?
    • terminal unaffected, as i use UbuntuMono there
  • Are you using OS X, Linux or Windows? And which specific version or distribution?
    • NixOS GNU/Linux, Version 23.05.20230506.897876e (Stoat)

★ Screenshots (Optional)

image
image

Can anyone reproduce this, is it maybe only NixOS?

@Finii
Copy link
Collaborator

Finii commented May 10, 2023

image

@Finii Finii added this to the v3.0.1 milestone May 10, 2023
Finii added a commit that referenced this issue May 10, 2023
[why]
With Ubuntu-Regular the fi and fl ligatures are replaced by some font
awesome icons.

The problem is that the font uses the non-standard F001 and F002
codepoints as intermediate referencve to create the actual ligatures
that are at codepoints FB01 to FB04.

[how]
All the normal ligature codepoints (FB00-FB06) are added to the glyph
reference checker and codepoints that are referenced by these are not
patched.

This means that F001 and F002 stay on the original ligatures and the
Font Awesome icons are missing, but this can not be fixed automatically
and would need to 'rewrite' the references inside the font.

Fixes: #1221

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Finii added a commit that referenced this issue May 10, 2023
[why]
With Ubuntu-Regular the fi and fl ligatures are replaced by some font
awesome icons.

The problem is that the font uses the non-standard F001 and F002
codepoints as intermediate referencve to create the actual ligatures
that are at codepoints FB01 to FB04.

[how]
All the normal ligature codepoints (FB00-FB06) are added to the glyph
reference checker and codepoints that are referenced by these are not
patched.

This means that F001 and F002 stay on the original ligatures and the
Font Awesome icons are missing, but this can not be fixed automatically
and would need to 'rewrite' the references inside the font.

Fixes: #1221

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii Finii mentioned this issue May 10, 2023
2 tasks
@Finii Finii removed this from the v3.0.1 milestone May 10, 2023
@Finii
Copy link
Collaborator

Finii commented May 10, 2023

Thanks again, fixed in 3.0.1 (will be)

Finii added a commit that referenced this issue May 10, 2023
[why]
With Ubuntu-Regular the fi and fl ligatures are replaced by some font
awesome icons.

The problem is that the font uses the non-standard F001 and F002
codepoints as intermediate referencve to create the actual ligatures
that are at codepoints FB01 to FB04.

[how]
All the normal ligature codepoints (FB00-FB06) are added to the glyph
reference checker and codepoints that are referenced by these are not
patched.

This means that F001 and F002 stay on the original ligatures and the
Font Awesome icons are missing, but this can not be fixed automatically
and would need to 'rewrite' the references inside the font.

Fixes: #1221

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

thyeun commented May 14, 2023

@Finii sorry the search (f002) become fl (this one wrong) after update to latest version 3.0.1, fl is fl (this one correct)

@Finii
Copy link
Collaborator

Finii commented May 14, 2023

In some fonts we could not solve this, where the ligature occupies the symbol codepoint directly.
But in most it should be solved, and if I read thyeun correctly Ubuntu is now fixed?
Some fonts map f i to a fi ligature that is only one 'cell' wide, which is of course unwanted, and we remove that ligature rules (I hope).

@thyeun
Copy link

thyeun commented May 14, 2023

@Finii See the below explanation.

Version 3.0.0
(f002) = (f002) = correct
fl = = wrong

Verison 3.0.1
(f002) = fl = wrong
fl = fl = correct

@Finii
Copy link
Collaborator

Finii commented May 15, 2023

Ubuntu is set up that ffollowed by imap to the ligature f_i (codepoint FB01) and that references the glyph fi (codepoint F001).

I do not know why the did this. Standard codepoint is FB01.

The reference "FB01 is the same as F001" can only be removed by manual editing the font, we have no automatism for that.

What changed between 3.0.0 and 3.0.1 is that the patcher does not touch any "essential" glyphs, and also follows all references through the font (which can be many).

Patching in at F001 is 'forbidden' at the moment, because that will (through the referense) touch a glyph that must not be touched (a latin letter (combination/ligature)).

I will think about that and how we can improve the situation.

@thyeun
Copy link

thyeun commented May 15, 2023

@Finii yup, that the issue i cant understand why they did that way. will it because this is a special to differentiate ubuntu mono and ubuntuor differentiate for others font?

@Finii
Copy link
Collaborator

Finii commented May 15, 2023

I can think of no reason for this design.

@Finii
Copy link
Collaborator

Finii commented May 15, 2023

Maybe they did it to have a simpler design for the ffi ligature, but then, this does not make much sense.

Removing the stuff is rather hard programmatically, you have to analyze multiple tables and references and see how it all fits together; I can do this manually but I am not good enough to program something that does it.

Edit: The Ubuntu Mono does not even have a ffi ligature at all, but the general fi lig design with reference to F001 is the same. 🤷‍♀️

@Finii
Copy link
Collaborator

Finii commented May 15, 2023

I will think about that and how we can improve the situation.

There are quite some fonts with this ...

DEBUG: Arimo-Bold.ttf Found essential Glyph at F001. Skipping...
DEBUG: Arimo-Bold.ttf Found essential Glyph at F002. Skipping...
DEBUG: Arimo-Regular.ttf Found essential Glyph at F001. Skipping...
DEBUG: Arimo-Regular.ttf Found essential Glyph at F002. Skipping...
DEBUG: FantasqueSansMono-BoldItalic.ttf Found essential Glyph at E008. Skipping...
DEBUG: FantasqueSansMono-BoldItalic.ttf Found essential Glyph at E009. Skipping...
DEBUG: FantasqueSansMono-Bold.ttf Found essential Glyph at E005. Skipping...
DEBUG: FantasqueSansMono-Bold.ttf Found essential Glyph at E006. Skipping...
DEBUG: FantasqueSansMono-Italic.ttf Found essential Glyph at E008. Skipping...    
DEBUG: FantasqueSansMono-Italic.ttf Found essential Glyph at E009. Skipping...    
DEBUG: FantasqueSansMono-Regular.ttf Found essential Glyph at E005. Skipping...   
DEBUG: FantasqueSansMono-Regular.ttf Found essential Glyph at E006. Skipping...   
DEBUG: InconsolataGo-Bold.ttf Found essential Glyph at F40A. Skipping...
DEBUG: InconsolataGo-Regular.ttf Found essential Glyph at F40A. Skipping...
DEBUG: LiberationSerif-BoldItalic.ttf Found essential Glyph at F004. Skipping...
DEBUG: LiberationSerif-Bold.ttf Found essential Glyph at F004. Skipping...  
DEBUG: LiberationSerif-Italic.ttf Found essential Glyph at F004. Skipping...
DEBUG: LiberationSerif-Regular.ttf Found essential Glyph at F004. Skipping...
DEBUG: Tinos-BoldItalic.ttf Found essential Glyph at F004. Skipping...
DEBUG: Tinos-Bold.ttf Found essential Glyph at F004. Skipping...
DEBUG: Tinos-Italic.ttf Found essential Glyph at F004. Skipping...
DEBUG: Tinos-Regular.ttf Found essential Glyph at F004. Skipping...
DEBUG: Ubuntu-BI.ttf Found essential Glyph at F001. Skipping...
DEBUG: Ubuntu-BI.ttf Found essential Glyph at F002. Skipping...
DEBUG: Ubuntu-B.ttf Found essential Glyph at F001. Skipping...
DEBUG: Ubuntu-B.ttf Found essential Glyph at F002. Skipping...
DEBUG: Ubuntu-C_modified.ttf Found essential Glyph at F001. Skipping...
DEBUG: Ubuntu-C_modified.ttf Found essential Glyph at F002. Skipping...
DEBUG: Ubuntu-LI.ttf Found essential Glyph at F001. Skipping...
DEBUG: Ubuntu-LI.ttf Found essential Glyph at F002. Skipping...
DEBUG: Ubuntu-MI.ttf Found essential Glyph at F001. Skipping...
DEBUG: Ubuntu-MI.ttf Found essential Glyph at F002. Skipping...
DEBUG: UbuntuMono-BI.ttf Found essential Glyph at F001. Skipping...
DEBUG: UbuntuMono-BI.ttf Found essential Glyph at F002. Skipping...
DEBUG: UbuntuMono-B.ttf Found essential Glyph at F001. Skipping...
DEBUG: UbuntuMono-B.ttf Found essential Glyph at F002. Skipping...
DEBUG: UbuntuMono-RI.ttf Found essential Glyph at F001. Skipping...
DEBUG: UbuntuMono-RI.ttf Found essential Glyph at F002. Skipping...
DEBUG: Ubuntu-M.ttf Found essential Glyph at F001. Skipping...
DEBUG: Ubuntu-M.ttf Found essential Glyph at F002. Skipping...
DEBUG: Ubuntu-RI.ttf Found essential Glyph at F001. Skipping...
DEBUG: Ubuntu-RI.ttf Found essential Glyph at F002. Skipping...
DEBUG: Ubuntu-R.ttf Found essential Glyph at F001. Skipping...
DEBUG: Ubuntu-R.ttf Found essential Glyph at F002. Skipping...

@thyeun
Copy link

thyeun commented May 15, 2023

@Finii one question, based from nerd cheatsheet, what is the different between codepoint (f002) and (e68f).

For me both look identical, but the codepoint is different and the codepoint (e68f) is appear correctly in Ubuntu nerd font for version 3.0.1

@Finii
Copy link
Collaborator

Finii commented May 15, 2023

Well, there are slight variances in thickness, and handle roundedness :-D

image

F002 (left) is from Font Awesome
E68F (right) is from Seti

Nerd Fonts is a collection of Icon sets and not 'a new set' with selected not-similar icons.
If two sets have similar icons, so be it.

Usually it's best to search via cheat sheet for what one likes the most:

There is also e644 and f422 ea6d f0349 and probably more ;) all similar but different.

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 Nov 20, 2023
LNKLEO pushed a commit to LNKLEO/Nerd that referenced this issue Nov 24, 2023
[why]
With Ubuntu-Regular the fi and fl ligatures are replaced by some font
awesome icons.

The problem is that the font uses the non-standard F001 and F002
codepoints as intermediate referencve to create the actual ligatures
that are at codepoints FB01 to FB04.

[how]
All the normal ligature codepoints (FB00-FB06) are added to the glyph
reference checker and codepoints that are referenced by these are not
patched.

This means that F001 and F002 stay on the original ligatures and the
Font Awesome icons are missing, but this can not be fixed automatically
and would need to 'rewrite' the references inside the font.

Fixes: ryanoasis#1221

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.

3 participants