-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Fallback in readCmapTable
, instead of using error
, for TrueType fonts with unsupported cmap formats (bug 1200096)
#6407
Conversation
…onts with unsupported cmap formats (bug 1200096) Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1200096. The problematic font has a `format 2` cmap, which we've never supported properly. Prior to PR 2606, we were able to fallback to a working state, despite not having proper support for that cmap format. Obviously the best/correct solution would be to implement actual support for more cmap formats[1]. However, I'm hoping that a simple patch will be OK for now, given that: - `format 2` cmaps seem to be quite rare in practice, since this has been broken for 2.5 years before anyone noticed. - Having a simple patch will make potential uplifts a lot easier. [1] See the specification at https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6cmap.html
/botio-windows preview |
From: Bot.io (Windows)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/da980fd669b0de4/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/da980fd669b0de4/output.txt Total script time: 1.05 mins Published |
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/0e9356aae7154f6/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/bcf7817cde27a8b/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/0e9356aae7154f6/output.txt Total script time: 18.93 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/bcf7817cde27a8b/output.txt Total script time: 19.43 mins
|
/botio makeref |
From: Bot.io (Linux)ReceivedCommand cmd_makeref from @brendandahl received. Current queue size: 0 Live output at: http://107.21.233.14:8877/518e7f522d32cc3/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @brendandahl received. Current queue size: 0 Live output at: http://107.22.172.223:8877/900615deb51ab6c/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/518e7f522d32cc3/output.txt Total script time: 18.93 mins
|
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/900615deb51ab6c/output.txt Total script time: 18.94 mins
|
Fallback in `readCmapTable`, instead of using `error`, for TrueType fonts with unsupported cmap formats (bug 1200096)
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1200096.
The problematic font has a
format 2
cmap, which we've never supported properly. Prior to PR #2606, we were able to fallback to a working state, despite not having proper support for that cmap format.Obviously the best/correct solution would be to implement actual support for more cmap formats[1]. However, I'm hoping that a simple patch will be OK for now, given that:
format 2
cmaps seem to be quite rare in practice, since this has been broken for 2.5 years before anyone noticed.[1] See the specification at https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6cmap.html