Mark2Mark / gintronic

This is a public repository where users can open issues for the monospaced font Gintronic by Mark Frömberg.
https://markfromberg.com/projects/gintronic/
27 stars 0 forks source link

Vertical align issue on Powerline font #8

Closed dongheeleeme closed 1 year ago

dongheeleeme commented 3 years ago

Hi, Thanks for the great font 😄 I could see the vertical-aligning issue in the Kitty terminal and Sublime Text. I think It works very well in other IDE and Terminal. Could you please have a look at this issue? Also, Could you please support powerline font?

Screenshot 2021-05-12 at 09 27 31

Mark2Mark commented 3 years ago

Thank you so much @dongheeleeme! Happy to hear that and happy to help.

I am happy to fix bugs, I need some more info though:

🙂

dongheeleeme commented 3 years ago

Hi @Mark2Mark,

Thank you for your response 😄

Other font

Screenshot 2021-05-17 at 18 06 58

Thank you!

Mark2Mark commented 3 years ago

Thank you!

I see, so it’s the text selection box that the font seems to hang a little to high in, right?

I’ll see what I can do. It might take a little as I need to do some research, as it seems to be happening only in some editors.

Which file format do you have installed? otf or ttf?

dongheeleeme commented 3 years ago

I've installed ttf on my machine.

Mark2Mark commented 3 years ago
Screenshot 2021-05-17 at 18 33 47

It looks like Sublime Text has some parameters in the settings file (there where you also set your font and the font size). Those are line_padding_top and line_padding_bottom. Depending on your font size, if you fiddle a bit with the numbers, it could work. For me it does.

On a side note: Sublime is a bit peculiar with the font size also. The font size and even the letter spacing jumps more or less between each single font-size. I just updated and it is still the same as it was in 2016 :D

dongheeleeme commented 3 years ago

@Mark2Mark but my screenshot was taken from the Kitty terminal 🤔

Mark2Mark commented 3 years ago

Oh, I could reproduce it in Sublime, so I started with that one.

I don’t have kitty, but does playing around with the custom line spacing in the kitty.conf file help anyhow? Or do they have something similar to the Sublime setting?

dongheeleeme commented 3 years ago

I think it would be good if this issue is fixed on the font side. I don't want to change settings whenever I use this font.

Mark2Mark commented 3 years ago

I understand that. But I am trying to debug the issue, because you mentioned that it only happens in Sublime and Kitty. That indicates to me, that the other editors handle the font fine. And I can’t fix if I don’t know yet the reason and/or can reproduce.

dongheeleeme commented 3 years ago

Yes, It makes sense although a little bit sad 😞 Thank you for supporting my request.

Mark2Mark commented 3 years ago

Don’t be sad. I am on it, but I need your help to fix that ;)

As written above

dongheeleeme commented 3 years ago

Please let me know if you need any help to fix this issue 👍 Thanks!

Mark2Mark commented 3 years ago

Yes, I’d like to know this:

I don’t have kitty, but does playing around with the custom line spacing in the kitty.conf file help anyhow? Or do they have something similar to the Sublime setting?

dongheeleeme commented 3 years ago

Yes, I’d like to know this:

I don’t have kitty, but does playing around with the custom line spacing in the kitty.conf file help anyhow? Or do they have something similar to the Sublime setting?

I couldn't see any options related this one so far 🤔

dongheeleeme commented 3 years ago

Hi @Mark2Mark 😄 I found this one from another font's issue. Maybe It's the same issue as I wrote here and It seems to be fixed as an updated font version. Please check this link. Thanks!

Mark2Mark commented 3 years ago

Thank you, I’ll have a look.

Where though, does it say that it was fixed in the font? I only see the sublime people saysing that they fixed that in Sublime.

dongheeleeme commented 3 years ago

I think this issue was fixed in the font as an updated version not sublime only. WDYT? @Mark2Mark

Tosche commented 3 years ago

I had the same report from Donghee regarding my Codelia. I checked how Kitty is highlighting the text, and it's puzzling. 191189313_174636574581792_1255005537813932235_n

See the shot 1: How Codelia's vertical metrics are set. typoLineGap is 80, hheaLineGap is 0.

スクリーンショット 2021-05-24 13 32 26

Shot 2: From top to bottom: Terminal, Kitty, and Sublime Text.

For Terminal and Sublime, I understand which values are being used. When it comes to Kitty, it's adding something below (a lot more than 80). Kitty's has only one line height/spacing control which adds padding to both top and bottom of the line, so it's not helpful.

Other fonts with the same issue: Consolas Droid Sans Mono Input

Without: Andale Mono Belinsky (my past font is fine?????) Comic Code Ligatures (my past font is fine?????) Fira Mono Inconsolata Iosevka Menlo PT Mono Source Code Pro Ubuntu Mono

Having compared all these fonts, I do not see what is common among the successful and unsuccessful ones, and precisely what is causing the issue.

Mark2Mark commented 3 years ago

Thanks so much for the research @Tosche I'll see if I can find some sort of issue.

@dongheeleeme Unfortunately I was too dumb to find an easy way to install kitty. The website is puzzling me to find a download. I am very busy with many projects so I can't spend hours installing random apps that I don't use. Do you have a quick install guide for me?

dongheeleeme commented 3 years ago

@Mark2Mark Which OS are you using?

Mark2Mark commented 3 years ago

macOS Big Sur. Thank you!

dongheeleeme commented 3 years ago

Thanks, I think you can install it using this command on Terminal brew install --cask kitty 😄 https://formulae.brew.sh/cask/kitty

Tosche commented 3 years ago

Upon some hours of investigation, I have come to an observation that the shape of Agrave affects the line height of Kitty for some reason, especially when it exceeds hheaAscender (yes, it affects the bottom bounds). The line spacing is fine when Agrave sits below hheaAscender, but when it's higher, it adds a lot of space at the bottom (the amount doesn't seem to be affected by how much larger the Agrave is). Needless to say the way Kitty handles line height is pretty nonsense and should rely on vertical metrics only. For now, the easy fix for Kitty users is to one of the following options:

Tosche commented 3 years ago

I'll file an issue to Kitty first. Let's see how he reacts.

Mark2Mark commented 3 years ago

Woah, Tosche! Thanks so much for all your time and sweat on this!

Tosche commented 3 years ago

It's here. Not a very helpful comment and the dev says À is not the issue as far as he is aware, but he does employ a strange method instead of actually looking inside a font. https://github.com/kovidgoyal/kitty/issues/3658

Mark2Mark commented 2 years ago

Thanks, but I will solve it when I find the time. So I re-opened it again :)

dongheeleeme commented 1 year ago

I'll close this issue again since it doesn't look will be solved.

Mark2Mark commented 1 year ago

It’s on my list and will be tackled. Sorry for the waiting.

Mark2Mark commented 1 year ago

Actually, having a look at the kitti issue that @Tosche opened, I agree that I think the guy fencing the discussion there seems a bit stubborn. Toshi’s observations are right, that they could and should just use the default CoreText line height instead of implementing their own way to calculate it. He blames Apple, but I developed a lot of MacOS apps myself using CoreText and there is nothing wrong with it’s line height. As Toshi also points out in that issue over at kitty, the same fonts behave properly in other apps that use CoreText.

Hence I will close this issue due to a quirky decision of one developer, which I find unreasonable to spend resources on to solve just because they don’t use the CoreText as it is supposed to. Thanks anyway for bringing it to our attention. Maybe Kitty will fix that eventually on their behalf.

dongheeleeme commented 3 months ago

Hi @Mark2Mark, I need your favor. Could you please delete this issue?

Mark2Mark commented 3 months ago

Hi @dongheeleeme, you mean remove this issue from Github or fix the problem that this issue is about?

dongheeleeme commented 3 months ago

Hi, I mean removing the issue from the repository. It is not a valid issue anymore.

Mark2Mark commented 3 months ago

So it works for you now in Kitty?

There is no need to remove an issue from the repository. When it is closed, it is considered removed :)