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

Ligatures look strange when using Noto mono font #511

Closed
MachFour opened this issue May 1, 2018 · 8 comments
Closed

Ligatures look strange when using Noto mono font #511

MachFour opened this issue May 1, 2018 · 8 comments

Comments

@MachFour
Copy link

MachFour commented May 1, 2018

Hello, I'm not sure if this is an issue with Kitty or with the Noto mono font itself, but the ligatures 'fi' and 'fl' (and ffi) are rendered strangely when in Kitty.

Here's a screenshot:
kitty-ligatures-noto

I'm using Kitty 0.9.0. Let me know if there's any other information that would be helpful

@kovidgoyal
Copy link
Owner

kitty needs an actual monospaced font. A font that creates a ligature out of neighboring characters that has a width different from the original characters is not monospaced and is not suitable for use in kitty. Mostly you should use monospaced fonts with ligatures designed for use in a terminal, such as fira code or operator mono lig or hasklig etc.

@MachFour
Copy link
Author

MachFour commented May 1, 2018

Thanks for the explanation!

For anyone that likes Noto fonts, there's a relevant issue open on the GitHub page, at https://github.com/googlei18n/noto-fonts/issues/1021

Amazingly, someone actually posted a patched set of Noto Mono fonts which disables ligatures and is a good workaround to use in Kitty. Link below:
https://github.com/googlei18n/noto-fonts/files/1690450/noto-sans-mono-patched-ligatures.zip

@freed00m
Copy link

freed00m commented Aug 6, 2018

hi @MachFour how did you set up the font in kitty.conf ?

kitty list-fonts is not showing it :| and I am unable to configure it so kitty would use the patched font

I refreshed font config and I am able to use noto font mono without ligatures for example in dunst and rofi but can't in kitty :'(

EDIT: It's bug in noto itself not declaring itself as monospace https://github.com/googlei18n/noto-fonts/issues/1128 would be awesome feature to use bugged fonts aswell

WORKAROUND on Arch based systems

mkdir ~/.config/fontconfig/conf.d
ln -s /etc/fonts/conf.avail/66-noto-mono.conf ~/.config/fontconfig/conf.d/66-noto-mono.conf

@MachFour
Copy link
Author

@freed00m for me, Noto Sans still doesn't show up in kitty list-fonts.
But I just use font_family Noto Sans in my kitty.conf and it works fine anyway xD

They've released some other patched versions upstream (if you look near the end of https://github.com/googlei18n/noto-fonts/issues/1021 there's a link) but I haven't tried them yet. Feel free to give it a go and let me know if they're any better/different.

@Snuggle
Copy link

Snuggle commented Aug 15, 2018

@freed00m Your workaround isn't working for me. :/
Still getting weird ligatures when I type fi. Using Noto Sans Mono from the noto-fonts Arch package.

image

@freed00m
Copy link

freed00m commented Aug 15, 2018

@Snuggle I also use the github patched at ~/.local/share/fonts/NotoSansMono these files maybe it had something to do it with also, but I don't think so. Have you rebooted your device or maybe your fontcache is not refreshed automatically ?

font_family      Noto Sans Mono
bold_font        auto
italic_font      auto
bold_italic_font auto
font_size 14.0

@Snuggle
Copy link

Snuggle commented Aug 15, 2018

Downloading the following fonts and moving them to /usr/share/fonts/noto fixed the weird ligature issue for me. It appears to be an upstream bug.

https://github.com/googlei18n/noto-fonts/tree/master/phaseIII_only/unhinted/otf/NotoSansMono

@freed00m
Copy link

freed00m commented Aug 15, 2018

@Snuggle - I fear it's not a bug but rather brainfart of the font designer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants