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

[skrifa] CJK autohinting weirdness #1129

Open
dfrg opened this issue Sep 4, 2024 · 0 comments
Open

[skrifa] CJK autohinting weirdness #1129

dfrg opened this issue Sep 4, 2024 · 0 comments

Comments

@dfrg
Copy link
Member

dfrg commented Sep 4, 2024

Some confusing bits in the FreeType CJK autohinter.

  1. Scaled/fitted values are never generated for stem widths so they're always 0.
    https://gitlab.freedesktop.org/freetype/freetype/-/blob/57617782464411201ce7bbc93b086c1b4d7d84a5/src/autofit/afcjk.c#L661

  2. There's an extra loop to detect round segments that is never executed because the pointer to the segments array is captured (as NULL) before the segments array is actually allocated (by the call to af_latin_hints_compute_segments).
    https://gitlab.freedesktop.org/freetype/freetype/-/blob/57617782464411201ce7bbc93b086c1b4d7d84a5/src/autofit/afcjk.c#L808

We'll just match this behavior for now but should investigate later to see what's going on.

@dfrg dfrg changed the title [skrifa] CJK autohinting: scaled widths are always 0? [skrifa] CJK autohinting weirdness Sep 4, 2024
dfrg added a commit that referenced this issue Sep 4, 2024
Adds the segment computation for CJK.

There's some dead code here that exists in FT but is never executed due to bugs. See #1129
dfrg added a commit that referenced this issue Sep 5, 2024
Adds the segment computation for CJK.

There's some dead code here that exists in FT but is never executed due to bugs. See #1129
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant