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

Line height went wrong after patching Comic Code #1165

Closed
3 tasks done
Mano-Liaoyan opened this issue Apr 9, 2023 · 15 comments
Closed
3 tasks done

Line height went wrong after patching Comic Code #1165

Mano-Liaoyan opened this issue Apr 9, 2023 · 15 comments

Comments

@Mano-Liaoyan
Copy link

🗹 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:

The line height is different after patching, but you can see longer characters display incorrectly

Expected behavior:

image

Example symbols:

image

🔧 Your Setup

  • Which font are you using (e.g. Anonymice Powerline Nerd Font Complete.ttf)?
    • Comic Code Medium Nerd Font Complete.otf
  • Where did you get the file from (download link, self patched, source downloaded from link...)
    • Selfpatched from Comic Code Medium (which is a copyright font)
  • Which terminal emulator are you using (e.g. iterm2, urxvt, gnome, konsole)?
    • Windows Terminal
  • Are you using OS X, Linux or Windows? And which specific version or distribution?
    • WSL2

★ Screenshots (Optional)

@Finii
Copy link
Collaborator

Finii commented Apr 9, 2023

Sorry to hear of your problem.

Maybe #850 (comment) can help you?

Which version of the patcher did you use (Nerd Fonts version number but more importantly the additional version in parens)?

Maybe we should add a commandline option to select one of the three different heights...

@Finii
Copy link
Collaborator

Finii commented Apr 9, 2023

@Mano-Liaoyan
Copy link
Author

Thank you for your kind reply Finii! I've followed the instruction for font-line, however, even if I tuned the percent value to 1, it also shifts down a bit and makes the whole format look so tight.

Looks good in fontforge
image
But not in terminal
ezgif com-gif-maker

In Windows:
image
You can see the j and f are not shown correctly

I wonder if there are other solutions. Thx.

Btw,
Nerd Fonts version: image

@Finii
Copy link
Collaborator

Finii commented Apr 9, 2023

I have only the demo here... (also downloaded from myfonts)

image

The problem with this font is that it has 'contradicting' baseline to baseline distances encoded:

image

The problem is in these metrixes

[OS/2] TypoAscender:   800
[OS/2] TypoDescender: -200
[OS/2] WinAscent:      1136
[OS/2] WinDescent:     331
[hhea] Ascent:         1136
[hhea] Descent:       -331

[hhea] LineGap:        200
[OS/2] TypoLineGap:    200

When I patch I get this output:

image


Needed to help with one of my kids homework 😬 Let me examine your new comment...

@Finii
Copy link
Collaborator

Finii commented Apr 9, 2023

Oh, you use v2.3.3 (3.5.1), but there is a bug exactly causing your problem that has been fixed with 3.5.7 see #850 (comment). Current is 3.6.1.

image

@Mano-Liaoyan
Copy link
Author

Haha, have fun with your kids! It's not emergence here :) . I also get the warning that reminds the vertical metrics are not consistent,
image
However, when I used the linegap version, the warning disappear,
image
If you don't mind, I can send an email to you that contains the font files

@Finii
Copy link
Collaborator

Finii commented Apr 9, 2023

This is the font-patcher version I use:

image

If you can update to at least 3.5.7 you should be able to patch yourself. If not, feel free to mail me the file(s) and I can patch them for you with v2.3.3 style or v3.0.0 ;-D
(Please specify which options you need, probably -wc.)

@Finii
Copy link
Collaborator

Finii commented Apr 9, 2023

Btw, if you patch more than one font (e.g. Medium and Bold or Medium and Medium-Italic, or even more) you should add --makegroups to avoid the broken old naming scheme.

Edit: Well, in fact you should always add that

@Finii
Copy link
Collaborator

Finii commented Apr 9, 2023

You seem to not-use the docker image. Probably you use the zip file.
The up-to-date master zip is not on the Release page but here https://github.com/ryanoasis/nerd-fonts/blob/master/FontPatcher.zip

@Mano-Liaoyan
Copy link
Author

You seem to not-use the docker image. Probably you use the zip file. The up-to-date master zip is not on the Release page but here https://github.com/ryanoasis/nerd-fonts/blob/master/FontPatcher.zip

Great! I have all the work done! Thanks a lot for your generous help!
image
All the icons are presented and fonts are correctly displayed! To you with all my sincere respect! Have a great day!

@Finii Finii changed the title Line height went wrong after patch the font Line height went wrong after patching Comic Code Apr 10, 2023
@Finii Finii closed this as completed Apr 10, 2023
@remiconnesson
Copy link

remiconnesson commented Aug 19, 2023

@Mano-Liaoyan I have the same issue and I'm failing to understand how you've set the correct line height

image

This is using the latest version of font-patcher

(it results in too much space between lines)
image

edit: I just saw you're using 2.3.3

edit2: I tried with
but also got an error :

image

this time it looks like the lines are too thin compared to the size of the characters

image

@Mano-Liaoyan
Copy link
Author

@remiconnesson Apologized for letting you wait for sooo long. I have not noticed this reply at all QAQ.

It seems that your command is different from mine.

image

Maby you can try the script above?

fontforge font-patcher -wc --makegroups *.otf

@Finii
Copy link
Collaborator

Finii commented Oct 5, 2023

@remiconnesson

Ah I see from the WARNING that there might be a problem with the metrics source in your case.
The PR

would enable you to patch the height as you want. Not sure why I did not pull that yet 🤔

@Finii
Copy link
Collaborator

Finii commented Oct 5, 2023

Because the line height is not consistent in that ComicCode it depends on your platform which line height is displayed for the unpatched font. Nerd Fonts unifies the line height (it can not possibly work if the line height is unknown or can vary platform to platform), so it has to choose one.

Please ping me if #1300 is not pulled soon ;-) I might forget it.

Also if you specify --debug 2 on your runs I will possibly more debug infos in your screenshots to work with.

Copy link
Contributor

github-actions bot commented Apr 8, 2024

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 Apr 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants