-
-
Notifications
You must be signed in to change notification settings - Fork 780
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
GPOS-modified glyphs May be being cached inappropriately #6261
Comments
Here's an easier repro. Put the following in
Then run the following and direct wezterm to use the output: fonttools feaLib -o myFont.ttf mangle.fea your_font_here.ttf Some letters should end up at weird positions. For example, my letter But in wezterm all instances of that letter got shifted down. Conversely, my |
What Operating System(s) are you seeing this problem on?
Linux X11
Which Wayland compositor or X11 Window manager(s) are you using?
i3 4.23
WezTerm version
20241007_103614_ed430415
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
I'm experimenting with patching fonts to insert spaces for thousand separators by moving the glyphs slightly using GPOS font rules. What I'm observing is that when I use such a patched font, sometimes it will modify a glyph with GPOS but all instances of that glyph get modified regardless of where they are on screen.
I think this is the same issue as #1931, and I assume it's because the GPOS modification gets into the cache but without being a unique cache entry or having the position modification noted externally in the cache.
To Reproduce
Pick your favorite font and patch with this tool:
https://github.com/sh1boot/digitgrouper/
Something like:
python3 digitgrouper.py --monospace comicsansmono.ttf
(producingoutput.ttf
).Configure it with
harfbuzz_features={'+dgsp'}
Before enabling it, ensure that a string like
0xabcdef0123456789
is very near to the top of the screen so that those glyphs are rendered and cached before any other instances of those glyphs are rendered.Configuration
Expected Behavior
Decimal numbers of more than four digits would have small gaps every third digit, grouping them into powers of one thousand. Hexadecimal numbers string with 0x would be similarly grouped into four digits.
Logs
No response
Anything else?
I have an alternate version which creates a ton of extra glyphs duplicating all the digits but at different positions. That works, but I wanted to try GPOS instead of GSUB to see if it made things more efficient.
The text was updated successfully, but these errors were encountered: