-
Notifications
You must be signed in to change notification settings - Fork 100
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
No fallback_fonts
support?
#80
Comments
Having the same problem here, can't get fallback fonts inside table cells |
prawnpdf/prawn#1054 |
With collecting some information, here is a workaround works for me:
Should works fine. |
@pointlessone So, I ran across this issue while researching if Prawn + Prawn-Table is a viable option for building out reports. It seems the issue is centered around the Table::Cell::Text class calling width_of on the font text (and other related methods) but the "text" does not get checked for fallback fonts before calling that method. In the core Prawn this happens because all text rendering ends up going through a Formatted::Box before doing any work, and that Box class has a series of functions to process the text ( #process_fallback_fonts ). So the question is how can we fix this issue cleanly in Prawn-Table?
|
@urkle I'm a bit rusty on the prawn-table internals. Option 2 sound like a cleaner approach. I take it's easier to copy code over but if we change how text boxes work in Prawn we will end up with a diverging implementation again. |
@pointlessone I have a working set of PRs. It required making some slight changes to Prawn core (adding a new method to the Fomatted::Box to request it calculate the width) prawnpdf/prawn#1259 - Core changes to prawn needed |
It seems that
fallback_fonts
are unsupported intable
s. That means if I want to put text of multiple languages in one table while having suitable font for each languages I am out of luck 😞Gives me this error
The text was updated successfully, but these errors were encountered: