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

Suspected endless loop in autohinting Shaper coverage computation with Poppins Semibold #1295

Open
drott opened this issue Dec 20, 2024 · 4 comments · May be fixed by #1296
Open

Suspected endless loop in autohinting Shaper coverage computation with Poppins Semibold #1295

drott opened this issue Dec 20, 2024 · 4 comments · May be fixed by #1296

Comments

@drott
Copy link
Contributor

drott commented Dec 20, 2024

In Chrome content_shell and https://rtsh.es/test/poppins.html the content tab starts to hang.
Running this and content_shell with gdb
$ gdb --args out/gnrelease/content_shell --single-process https://rtsh.es/test/poppins.html
Then stopping and running
thread apply all backtrace

reveals the stack trace at which this is hanging:

[#65 repeats]
#65 0x00007ffff5913703 in skrifa::outline::autohint::shape::GsubHandler::process_lookup::h05a71b4249d913f6 () at /usr/local/google/home/drott/dev/blink/src/out/gnrelease/libskia.so
#66 0x00007ffff5910d39 in skrifa::outline::autohint::shape::Shaper::compute_coverage::h8b6af0d2971cd068 () at /usr/local/google/home/drott/dev/blink/src/out/gnrelease/libskia.so
#67 0x00007ffff58fe6fd in skrifa::outline::autohint::style::GlyphStyleMap::new::he7232822c79b7d06 () at /usr/local/google/home/drott/dev/blink/src/out/gnrelease/libskia.so
#68 0x00007ffff590021b in skrifa::outline::autohint::instance::GlyphStyles::new::h8993ddbc473295b4 () at /usr/local/google/home/drott/dev/blink/src/out/gnrelease/libskia.so
#69 0x00007ffff5900407 in skrifa::outline::autohint::instance::Instance::new::h1fd5544fce0fc93c () at /usr/local/google/home/drott/dev/blink/src/out/gnrelease/libskia.so
#70 0x00007ffff587e861 in skrifa::outline::hint::HintingInstance::reconfigure::hff00a995aaa3c43c () at /usr/local/google/home/drott/dev/blink/src/out/gnrelease/libskia.so
#71 0x00007ffff587efe2 in skrifa::outline::hint::HintingInstance::new::h8760a010858fb68a () at /usr/local/google/home/drott/dev/blink/src/out/gnrelease/libskia.so
#72 0x00007ffff5866eaf in skia_cbridge_urust_uside::make_hinting_instance::h8f1b0d2f10919329 () at /usr/local/google/home/drott/dev/blink/src/out/gnrelease/libskia.so
#73 0x00007ffff57b1c94 in fontations_ffi::make_hinting_instance(fontations_ffi::BridgeOutlineCollection const&, float, fontations_ffi::BridgeNormalizedCoords const&, bool, bool, bool, bool) () at /usr/local/google/home/drott/dev/blink/src/out/gnrelease/libskia.so
#74 0x00007ffff53492d7 in SkFontationsScalerContext::SkFontationsScalerContext(sk_sp<SkTypeface_Fontations>, SkScalerContextEffects const&, SkDescriptor const*, sk_sp<SkTypeface>) () at /usr/local/google/home/drott/dev/blink/src/out/gnrelease/libskia.so
@drott
Copy link
Contributor Author

drott commented Dec 20, 2024

@drott
Copy link
Contributor Author

drott commented Dec 20, 2024

Does seem to occur with Poppins 4.003 from MS:
https://puzmo.blob.core.windows.net/assets/fonts/Poppins-SemiBold.ttf
but not with 4.004(b4) from Google Fonts.

@drott
Copy link
Contributor Author

drott commented Dec 20, 2024

Does not repro with https://github.com/itfoundry/Poppins/releases/tag/v4.003 and file Poppins-SemiBold.ttf from that archive.

@dfrg
Copy link
Member

dfrg commented Dec 20, 2024

Does seem to occur with Poppins 4.003 from MS: https://puzmo.blob.core.windows.net/assets/fonts/Poppins-SemiBold.ttf but not with 4.004(b4) from Google Fonts.

In this font, lookup 27 (from abvs feature) is a contextual lookup with two subtables that both chain to lookup 0 which is another contextual lookup with four subtables that all cycle.

dfrg added a commit that referenced this issue Dec 20, 2024
Adds a stack to detect cycles in GSUB lookups while computing shaper coverage for autohinting.

Fixes #1295
@dfrg dfrg linked a pull request Dec 20, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants