-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Unicode rendering issue from version 0.14.1 #1713
Comments
There haven't been any changes to font rendering between those two versions. Most likely the fallback font being used for those symbols has changed because of changes on your system. Use --debug-font-fallback to see which font is used and symbol_map in kitty.conf to control it. |
I tried, and for lambda debug returns completely same info: 0.14.0:
0.14.1
When i define Is there a way to use different font for all unicode chars? symbol_map requires defining each separately, or a range. |
Wasn't there a change that automatically adapted the line height if symbols are too high or something like that? |
That would only affect line height not font selection/rendering. |
If you want to use deja vu sans mono bold for all character set it in the font_family directive |
Personally, I get best results for unicode symbols with symbola |
I would like to keep using font that i'm currently using now, and for all symbols to use something else. If i remember well iTerm has a similar feature where they allow choosing different font for those (regular and ascii). |
So use the appropriate range in symbol_map |
@Luflosi is right, it is related to the line height. Up until value of 3 it looks relatively ok, but from 3 and above it is like on the initial screenshot. |
well zero is the default value, so I think we are good here. |
It's probably commit 1ae32b5. |
yes, zero is default value, but that doesn't suit me. |
well like I said, as far as I know, nothing has changed in font rendering, but you are welcome to bisect and find out what is causing it. |
All that does is change the default calculated line height for a font that draws the underscore outside the cell. The adjustment option is applied afterwards. |
@kovidgoyal i did bisect and that 1ae32b5 causes the problem. Commit before it works fine 4e9dabf I would fix it, but i never wrote C. |
As I said before, all that patch does is change the default line height |
Not sure i understand. How can i compensate anything by changing |
That commit changes the value of cell_height. adjust_line_height also |
I tried all from 0 - 20, and only 0 - 3 renders it ok. Everything above that causes issue (more or less). Can this code be set up somehow to optionally include/exclude the new cell calculation, and use the old on instead? |
Sorry I dont follow. The cell height calculation has changed, if you dont like the new calculation you can revert its effects by using adjust_line_height. That is not a bug. The new calculation compensates for broken fonts that dont have correct bounding boxes that would otherwise result in underscores and bottoms of characters being cut-off. |
Yes, when whole font family is DejaVu Sans Mono, it also works fine for me. When i checked, font fallback for lambda was Dejavu Sans Mono. |
If you use multiple fonts, then whether any given character will render correctly or not depends entirely on whether that character as designed in the secondary font, will fit in the cell size for the main font. There are no guarantees in that case. As I said earlier try using symbola, in my experience, that works best with a wide range of main fonts. |
Fair enough. When i start kitty with --debug-font-fallback, i get this for a checkmark:
As i recall, this tells that DejaVu Sans Mono Bold font is used as fallback for the checkmark https://www.compart.com/en/unicode/U+2714 With this fallback, it renders like this: Now, when i add this to config:
What's the difference? |
Weird, there shouldn't be any difference -- what does --debug-gont-fallback print out aboutsymbol fonts in the latter case |
In the latter there's no any output for U+2714, only for lambda and that branching char.
|
But there will be some output about a symbol map font right at the |
Oh yeah, sorry. Here's the whole output:
|
Hmm dont see anything there to explain it and I cant reproduce on my system with
|
Try setting line height to 8. |
Any luck with the line height setting? |
I will look atit when I have a moment, am rather swamped for now. |
You should probably reopen this so you can keep track of it. |
Thanks! |
Today i updated my kitty from 0.14.0 to latest version.
When i restarted it, i noticed that some unicode characters are rendered differently.
Here's screenshot with 0.14.0:

And here's with 0.14.1:

Note the Lambda and checkmark.
I tried to find commit that introduced it, but no luck.
Here are some system and configuration information:
The text was updated successfully, but these errors were encountered: