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

fl/fi Ligatures always appearing in patched Monaco font #254

Closed
timoxley opened this issue Apr 1, 2018 · 43 comments
Closed

fl/fi Ligatures always appearing in patched Monaco font #254

timoxley opened this issue Apr 1, 2018 · 43 comments
Assignees
Labels
Milestone

Comments

@timoxley
Copy link

timoxley commented Apr 1, 2018

I've even tried editing the patch script to remove all lookup tables, yet the damn ligatures continue to persist.

i.e.

  for table in sourceFont.gsub_lookups:
      symfont.removeLookup(table)

Any ideas on what's going on? I'm guessing there's some default ligature setting being inherited? Is there a way to turn that off in the generated font?

Turning off set macligatures in vim is my temporary workaround.

@ryanoasis
Copy link
Owner

@timoxley Hey sorry not that I know of.

The ligatures are present in the source font pre-patching right?

What is the name of the tables that get removed in the iteration?

By the way the font-patcher is setup with the ability to remove subtables (but not tables) via --removeligatures in conjunction with --configfile [json like config file]

config example: https://github.com/ryanoasis/nerd-fonts/blob/master/src/unpatched-fonts/Meslo/config.json

@timoxley
Copy link
Author

timoxley commented Apr 2, 2018

The ligatures are present in the source font pre-patching right?

@ryanoasis There are some lookup tables in the font, but the ligatures seem to be disabled when using the font. The ligatures only appear when using the font after patching, even after removing all tables.

What is the name of the tables that get removed in the iteration?

'rtla' Right to Left Alternates lookup 0
<27,0> Canonical Decomposition in Latin lookup 1
<27,0> Canonical Decomposition lookup 2
<27,0> Canonical Decomposition lookup 3
<27,0> Canonical Decomposition in Latin lookup 4
<1,2> Common Ligatures in Latin lookup 5
<27,2>  in Latin lookup 6
<27,0> Canonical Decomposition lookup 7

The same tables appear after generating the font using unmodified font-patcher.

font-patcher is setup with the ability to remove subtables

Yep, I tried this first, but it didn't seem to have any effect, hence trying a nuclear "remove all tables" option.

@ryanoasis
Copy link
Owner

@timoxley Thanks for the details 👍 , that is strange. I would like to take a look but I cannot tell you when that'll be 😓

@timoxley
Copy link
Author

timoxley commented Apr 3, 2018

@ryanoasis

No action required on your part, was hoping it would be something you knew off the top of your head.

Oh, also note that when I first patched the font using --complete, the fi and fl ligatures were remapped – one became an icon for a telephone. This was an entertaining surprise when I discovered it in my editor.

Source Font Monaco

image

After font-patcher --mono --powerline --fontawesome --powerlineextra

image

After font-patcher --mono --complete

image

🥇

Examining the lookup table via FontForge seems to reveal the issue:

image

@sirplatypos
Copy link

I have been having the problem with the phone symbol and such as well using the AUR nerd-fonts-complete package. Is there a way to get around this problem without patching all of the fonts by hand?

@timoxley
Copy link
Author

@sirplatypos I just live with the phones

@sirplatypos
Copy link

I fixed the problem for myself by removing the subtable that replace the characters with the ligatures. It had been set to replace the normal ff and such with the phone, the priority low symbol, etc. If you're still having the problem, get font forge and remove the ligature subtable.

@sirplatypos
Copy link

sirplatypos commented Jul 21, 2018

ubuntu-regular.zip
This is ubuntu nerd font regular with the table removed, in case anybody wants it. I don't know how many other fonts have this issue. The symbols in this file were replaced by the ligatures from the regular ubuntu font, so it is missing the phone and such. The problem is that despite the ubuntu font having the ligatures, whoever patched the font removed the ligatures and replaced them with other symbols.

Please fix this problem upstream, by either removing the ligature subtables, or preferably by putting the ligatures originally present in the font back and then placing the other symbols somewhere else.

@ykyuen
Copy link

ykyuen commented Sep 27, 2018

+1 hving the same problem with Ubuntu font

@luispuerto
Copy link

I'm having the same problem with monaco font... and as @sirplatypos did I just remove the ligatures with fontforge and that is. I don't know if I've broken anything in the process but I hope I didn't.
No more phones ☎️ .

@anelson
Copy link

anelson commented Mar 25, 2019

I'm having this problem also using the latest version of the Arch linux AUR package nerd-fonts-complete. In my case I'm using the "NotoSerif NerdFont". Here's an example:

image

It's sufficiently annoying that I'm about to revert back to the regular Noto font family and use the NerdFont version only in the terminal. Before I do that does anyone have a workaround (or better yet, a fix), other than manually editing the font in FontForge?

@stellarhoof
Copy link

The Ubuntu Condensed font also has this problem.

anelson added a commit to anelson/dotfiles that referenced this issue Mar 28, 2019
I was using the `NotoSerif NerdFont` variation of `Noto Serif` because I
already use the nerdfont variant for the terminal and I figured I may as
well be consistent and make sure I can support NerdFont glyphs in the
browser also.  It was a good idea, and someday maybe it will work.

But for now there's this issue [1], which is blocking any progress.
It's maddening to read text when various emojis are injected in place of
certain ligatures.

[1](ryanoasis/nerd-fonts#254)
@ryanoasis
Copy link
Owner

Sorry for the late reply, yeah I think the real solution will involve not clobbering the ligatures but that will involve moving some of the codepoints of some glyphs. That would probably result in a 3.0 release (breaking change).

There is another workaround worth mentioning (if one patches themselves). that is using the --careful flag. That will ensure existing glyphs don't get clobbered, for example:

left: original font
center: straight up patch
right: patch with the --careful flag
VictorMono-Regular-patching-comparisons

Ref: #57 (comment)

@adinklotz
Copy link

adinklotz commented Aug 21, 2019

In the mean time, is there any chance of getting sirplatypos's fixed version of Ubuntu on the readme list or releases page for easy discoverability, or do we not want that as an official version since it's missing some glyphs?

@jrwrigh
Copy link

jrwrigh commented Nov 6, 2019

@ryanoasis's solution isn't entirely complete (though this might be related to terminal). Using "Share Tech Mono", the ligature overlaps with the next character:

image
^^ This flaflofle

Note this is on Konsole 2.14.2, which is fairly old.
Edit: This also occurs on Konsole 19.08.2, which is much newer

Edit2: Just to confirm, removing the fi and fl ligatures from the font via FontForge fixes the issue for both Konsole 2.14.2 and 19.08.2

@revarcline
Copy link

Also having this problem with the downloaded version of Inconsolata Nerd Fonts Mono

@PonasKovas
Copy link

PonasKovas commented May 10, 2020

has there been any progress? I don't know much about fonts so I don't really know how to ☎️x it for myself and the telephones are very annoying...

@timoxley
Copy link
Author

@PonasKovas eventually you'll learn to love the telephones and it will look wrong to not have them. In these trying times, it's imperative to be able to ☎nd ways to accept things for what they are and move on, always better and stronger.

@jrwrigh
Copy link

jrwrigh commented May 10, 2020

@PonasKovas It's a fairly easy manual fix that I briefly mentioned in my second edit here. You essentially:

  1. Open the font in font forge
  2. Find the offending characters (fb01 and fb02)
  3. Delete the offending characters
  4. Save the font

I had no experience in working with fonts before I did this and it didn't take too long.

@demfabris
Copy link

Same issue with Inconsolata Nerd Font from the AUR package

@demfabris
Copy link

@PonasKovas It's a fairly easy manual fix that I briefly mentioned in my second edit here. You essentially:

  1. Open the font in font forge
  2. Find the offending characters (fb01 and fb02)
  3. Delete the offending characters
  4. Save the font

I had no experience in working with fonts before I did this and it didn't take too long.

im trying to do that but the font breaks when exporting.. how do i save it properly?

@0xRainy
Copy link

0xRainy commented Jun 25, 2020

im trying to do that but the font breaks when exporting.. how do i save it properly?

Just went through this process.. Find the ligatures and clear the ones you don't want then File>Generate fonts>Choose the font type (ttf or CFF (which is OTF)) and leave all the options alone.

Don't know if it matters but they suggest running it as administrator

@pinpox
Copy link

pinpox commented Jan 4, 2021

Ring, ring... Also happening with Overpass.. any progress on this besides patching it myself?

@ibraheemdev
Copy link

Is there a fork with the fixed fonts for someone who doesn't want to patch manually?

@stelcodes
Copy link

Having the same phone problem on NixOS. I personally do not like the phones. fi

@pinpox
Copy link

pinpox commented May 18, 2021

I just ended up using the non-patched font as main font and defining the patched one as fallback in my terminal emulator. But I have since moved to a different font as I was starting to get bad dreams about ringing phones. I just stay subscribed to the issue because it makes me laugh every time I get a notification.

@jef
Copy link

jef commented Jun 25, 2021

I just ended up using the non-patched font as main font and defining the patched one as fallback in my terminal emulator

That's a great idea! Didn't think about that one...

@arminbw
Copy link

arminbw commented Dec 9, 2021

I had several different font versions floating around and solved the problem by flushing the font caches and reinstalling the latest version.

@ryanoasis ryanoasis self-assigned this Dec 13, 2021
@ryanoasis
Copy link
Owner

It's been a long time but I think I've got a better solution now.

Comment with screenshots here: #509 (comment)

Finii added a commit that referenced this issue Dec 13, 2021
[why]
When we overwrite a glyph that originally had some special handling, be
it a substitution or position table entry (GPOS/GSUB), that special
handling is usually not appropriate anymore and has to be removed.

If we need special lookup table entries for the new glyph we would have
to add them later anyhow, because we can not rely on their existance.

In Issue #509 it was a ligature entry, that replaced 'f' followed by 'i'
with the 'fi' ligature. The ligature glyph is overwritten by us with a
telephone symbol and the substitution table entry makes no sense
anymore.

[how]
If we overwrite a preexisting codepoint we remove it from all lookup
tables.

Thanks to all other reporters with details.

Fixes: #509 #254

Reported-by: mangelozzi <[email protected]>
Signed-off-by: Fini Jastrow <[email protected]>
@Finii
Copy link
Collaborator

Finii commented Dec 13, 2021

Seems github did not pick up my 'PR will close this isse' tag 🙄

@jef
Copy link

jef commented Dec 15, 2021

Seems github did not pick up my 'PR will close this isse' tag 🙄

I think if you use it without a colon and you can only use one issue ref per line:

Fixes #509
Closes #254

Something like that 😄

@mundodisco8
Copy link

Just commenting because I have the issue and wanted @pinpox to have a laugh.

@Finii
Copy link
Collaborator

Finii commented Feb 10, 2022

@mundodisco8 Do you use the newest, updated font?

@mundodisco8
Copy link

mundodisco8 commented Feb 11, 2022 via email

@joachimnielandt
Copy link

joachimnielandt commented Mar 3, 2022

Just installed nerd-fonts-complete from aur to check if the phone was still present for my current font, which is was. Figured i'd check all nerd fonts, while I was at it. The following fonts are afflicted (looked for the phone substitution using font-manager).

Afflicted fonts

  • Inconsolata Nerd Font
  • Inconsolata Nerd Font Mono
  • mplus Nerd Font
  • mplus Nerd Font Mono
  • NotoSansDisplay Nerd Font
  • NotoSansDisplay Nerd Font Mono
  • NotoSansMono Nerd Font
  • NotoSansMono Nerd Font Mono
  • NotoSerifDisplay Nerd Font
  • NotoSerifDisplay Nerd Font Mono
  • NotoSerif Nerd Font
  • NotoSerif Nerd Font Mono
  • OpenDyslexicAlta Nerd Font
  • OpenDyslexicAlta Nerd Font Mono
  • OpenDyslexic Nerd Font
  • OpenDyslexic Nerd Font Mono
  • Overpass Nerd Font
  • Overpass Nerd Font Mono
  • ShureTechMono Nerd Font
  • ShureTechMono Nerd Font Mono
  • SpaceMono Nerd Font
    • note: Mono variant does not contain the error
  • UbuntuCondensed Nerd Font
  • UbuntuCondensed Nerd Font Mono
  • Ubuntu Nerd Font
  • Ubuntu Nerd Font Mono

@Finii
Copy link
Collaborator

Finii commented Mar 3, 2022

The AUR is if course not up to date :-D, complain at the repo manager that it relies on releases and not HEAD ;-)

@joachimnielandt
Copy link

The AUR is if course not up to date :-D, complain at the repo manager that it relies on releases and not HEAD ;-)

Ah yes, didn't notice that... I guess waiting for a new release isn't the end of the world :). Thx for the info!

@pinpox
Copy link

pinpox commented Mar 3, 2022

complain at the repo manager that it relies on

Hm, maybe give him a call?

@joachimnielandt
Copy link

It makes sense for the AUR to fetch a release though? This project produces releases for a reason, I assume?

@Finii
Copy link
Collaborator

Finii commented Mar 3, 2022

No yes. Please note the emoticons, that was a not serious comment.

I hope the 2.2.0 RC turns into a release soon...
But then, there are still some PR that I would love to see in 2.2 and not only in 3.0 🙄

I kind of do not get it... if you use Arch, why not selfpatch ;-D
If it would be Ubunterians... I could unterstand their dependence on release packages.
But then I saw how integrated Nerd Fonts is in the Arch dependencies, and I went like ... WAT?

@Finii
Copy link
Collaborator

Finii commented Jan 31, 2023

This fl ligature transmogrifies into a telephone should have been fixed by

All the AUR packages are also updated to v2.3.3, well, they are not in AUR anymore but in Community.
https://archlinux.org/packages/?sort=&repo=Community&q=-nerd

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 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 Aug 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests