-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Enable pango_font_info_test and fix crash for MacOS with M1 #3189
Conversation
Most parts of that test can now be used without Tensorflow code. Signed-off-by: Stefan Weil <sw@weilnetz.de>
The original code crashes in pango_fc_font_get_glyph on MacOS with M1. Replacing the type cast with the macro made for that conversion gives at least an error message before crashing: (process:12546): GLib-GObject-WARNING **: 08:38:02.472: invalid cast from 'PangoCairoCoreTextFont' to 'PangoFcFont' zsh: segmentation fault ./pango_font_info_test Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes the crash on MacOS with M1. Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
See also issue #2599. |
build is failing for ubuntu:
|
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The new code requires Pango 1.44 for |
Which parts do not pass? Maybe you can add TODO above each one? |
It looks like on MacOS the test sees all MacOS fonts instead of the limited set which is installed in
|
The text renderer was designed to work with the FontConfig backend, even on macOS, and it appears that your pango version uses the CoreText backend. |
It's from Homebrew, and that should work with FontConfig. |
You are right, thank you. The test passes with |
It works with text2image thanks to this code: tesseract/src/training/text2image.cpp Lines 720 to 726 in 45413e6
|
thanks |
No description provided.