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

Variable font rendering: Diacritics based on composites are misaligned to base glyph #783

Open
herrstrietzel opened this issue Jan 14, 2025 · 0 comments
Labels

Comments

@herrstrietzel
Copy link

herrstrietzel commented Jan 14, 2025

Apparently, Opentype.js 2.0 has issues rendering glyphs with diacritics correctly in VFs

image

Steps to reproduce

Set variation setting deviating from the fonts defaults like so

font.variation.set({ wght: 200, wdth: 75 });

Diacritic/component alignment works correctly for default axes like

font.variation.set({ wght: 400, wdth: 400});

When inspecting the glyph's components the dx values stick to the default values (wght:400, wdth:100) regardless of the current axes settings.

Assumption this issue may be caused by a miscalculation in function buildPath(glyphs, glyph) missing dx adjustments.

Tested with these VF fonts:

Reproducible in the font inspector demo
using https://opentype.js.org/dist/opentype.js;

See also codepen

@herrstrietzel herrstrietzel changed the title Variable font rendering: Diacritics based on composites show offsets/incorrect dx Variable font rendering: Diacritics based on composites are misaligned to base glyph Jan 14, 2025
@Connum Connum added the bug label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants