Need help with patching Comic Code - Incorrent glyph rendering. #1298
Replies: 7 comments 25 replies
-
Beta Was this translation helpful? Give feedback.
-
The first two images, which terminal is that? If you try to increase the line hight (line to line distance), there are some terminals out there that stretch glyphs that are "a full cell height", but of course do not touch glyphs that are not touching top and bottom of the cell. Depending on which codepoint you use for the vertical bar, maybe that glyph is not reaching the top and bottom. If that is not patched in by the patcher we have no influence on that. Furthermore usually only the Powerline glyphs and the block building glyphs are scaled for full height by the patcher. |
Beta Was this translation helpful? Give feedback.
-
See also |
Beta Was this translation helpful? Give feedback.
-
Font metric warning... The cell height looks rather big, but the Powerline glyph is not cut on the rhs. |
Beta Was this translation helpful? Give feedback.
-
Hmm, We select the bigger line spacing, and that is still not big enough for you? 🤔 Looking on the originally embedded Powerline glyphs we can determine what they think the call height should be: Looks ok-ish and similar-y, although maybe we are a tad higher. 🤔 But 1200 is for sure too small. |
Beta Was this translation helpful? Give feedback.
-
Ugg, just noticed There is no mention in your logfile, so they should be untouched. box_enabled = self.source_monospaced and not self.symbolsonly # Box glyph only for monospaced and not for Symbols Only
box_keep = False
if box_enabled:
self.sourceFont.selection.select(("ranges",), 0x2500, 0x259f)
box_glyphs_target = len(list(self.sourceFont.selection))
box_glyphs_current = len(list(self.sourceFont.selection.byGlyphs))
if box_glyphs_target > box_glyphs_current:
# Sourcefont does not have all of these glyphs, do not mix sets (overwrite existing)
if box_glyphs_current > 0:
logger.debug("%d/%d box drawing glyphs will be replaced",
box_glyphs_current, box_glyphs_target)
box_enabled = True
else:
# Sourcefont does have all of these glyphs
# box_keep = True # just scale do not copy (need to scale to fit new cell size)
box_enabled = False # Cowardly not scaling existing glyphs, although the code would allow this Ah and the source does have all the box glyphs, so not touching. |
Beta Was this translation helpful? Give feedback.
-
Are you able to try a You could then try
(One or the other should be sufficient) |
Beta Was this translation helpful? Give feedback.
-
Hey there,
I use Comic Code which is a paid font that I patched.
Using the fontpatcher, I call this command to patch the fonts:
fontforge -script ~/FontPatcher/font-patcher "/mnt/c/Fonts/Comic Code/Nerd Font Patched/ComicCode-Regular.otf" --out "/mnt/c/Fonts/Comic Code/Nerd Font Patched" --makegroup -1 --complete
This seems to work mostly fine, doesn't have any issues with missing glyphs, however the problems are with how the glyphs are rendered:
You can see that glyph U+E0B6 (1) renders fine, but glyph U+EB04 (2) is cutoff slightly on its right edge.
But my bigger problem is that glyphs don't seem to be taking up the full height of the character box:
This is in Neovim, the issue is that the vertical bars being rendered (U+2502) are supposed to be full height, but instead the top of the glyph is cutoff, leading to that dashed line. Using the pre-patched CaskaydiaCove Nerd Font, you can see what the glyph is supposed to look like:
If I use Windows Terminal Preview version 1.18.1462.0, I can change the line height to 1.2 which fixes the vertical lines, however now the text is too close together, making it difficult to read for me:
Is this a problem with the way I'm patching the font, or is there just nothing I can do in this scenario?
Environment:
Windows 11, WSL 2, Ubuntu
Windows Terminal 1.17.11461.0
NerdFont Patcher 3.0.2 (4.4.0)
Beta Was this translation helpful? Give feedback.
All reactions