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

Fix font rendering for long glyphs #1501

Merged
merged 1 commit into from Apr 25, 2024
Merged

Conversation

Yaraslaut
Copy link
Member

Closes #1349

Bug is happening due to bad offset of the glyph that is positioned after the glyph with non-standard advance

for MonaspiceKrNerdFont

====================================
tryShape: font=0, codepoints="===a"
gpos: (10113+0+0|32+0)
gpos: (66+0+0|10+0)
====================================
tryShape: font=0, codepoints="===a:"
gpos: (10113+0+0|32+0)
gpos: (66+0+0|10+0)
gpos: (27+0+0|10+0)

While for CascadiaCode

====================================
tryShape: font=0, codepoints="===a"
gpos: (2665+0+0|10+0)
gpos: (3125+0+0|10+0)
gpos: (3125+0+0|10+0)
gpos: (225+0+0|10+0)
====================================
tryShape: font=0, codepoints="===a:"
gpos: (2665+0+0|10+0)
gpos: (3125+0+0|10+0)
gpos: (3125+0+0|10+0)
gpos: (225+0+0|10+0)
gpos: (1864+0+0|10+0)

So while for CascadiaCode ligature is represented as separate codepoints, Monaspice merges them together with bigger advance

@github-actions github-actions bot added the fonts font rasterization and text shaping API and platform implementations label Apr 23, 2024
@Yaraslaut Yaraslaut force-pushed the fix/merged_codepoints branch 2 times, most recently from 584aa7d to 484393a Compare April 23, 2024 16:59
@Yaraslaut Yaraslaut marked this pull request as draft April 24, 2024 12:21
@Yaraslaut Yaraslaut marked this pull request as ready for review April 24, 2024 15:40
@github-actions github-actions bot added the VT: rasterizer Rendering of the terminal into a pixmap using `terminal_renderer` library label Apr 24, 2024
Copy link
Member

@christianparpart christianparpart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks, @Yaraslaut :)

@christianparpart christianparpart merged commit f11a560 into master Apr 25, 2024
56 of 57 checks passed
@christianparpart christianparpart deleted the fix/merged_codepoints branch April 25, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fonts font rasterization and text shaping API and platform implementations VT: rasterizer Rendering of the terminal into a pixmap using `terminal_renderer` library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Characters render on top of ligatures
2 participants