-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conflict with ggplot2 and Arabic & Hindi #50
Comments
Can you share your operating system and the graphics device you are using |
OS: Windows 10 Enterprise V 22H2 build 19045.5247 |
Just as a sanity check, can I get you to see if everything works as expected using the ragg graphics devices? |
The setting you mention only affects the plot pane. For knitting you need to set |
Keeping the AGG selection on the backend, keeping |
Ok, hmm. I think there is two things at play. Your original issue I think is a duplicate of #35 which I have yet to find a sensible reason for. I have no idea why attaching textshaping has influence over graphics devices that doesn't use it. As for the rectangles with hindi it appears that the any fallback isn't found. What do you get if you run |
Running
yields a 5X2 dataframe:
|
Thanks - that is obviously not good. What is the output of |
I apparently have 458 fonts installed so I won't give you the whole thing, but the first 10 rows are:
|
Haha, thanks. It was mainly a test to check whether it came up almost empty... I'll think some more on this and get back to you |
If you are able to compile textshaping, can I get you to try to install textshaping#56 ( |
thanks - I've dusted off a Win VM and can reproduce locally. Hopefully I can get to the bottom of this |
A workaround is necessary to get
ggplot2
to work with Arabic and Hindi whenflextable
is loaded. (Issue is also discussed here: https://stackoverflow.com/questions/79324809/conflict-between-flextable-ggplot2-and-arabic-hindi). I narrowed the problem down totextshaping
, which is a dependent ofragg
, which is a dependent ofofficer
, which is a dependent offlextable
. Here's an example that also includes English and Russian to show that things work fine with those:English output (works fine):
Russian output (works fine):
Hindi output (text is removed):
The Arabic plot doesn't render at all.
Using
unloadNamespace("textshaping")
before running the plot functions didn't work, but usingpkgload::unload("textshaping")
did work, and the plots render as expected.Hindi:
Arabic:
Hindi and Arabic seem to render fine when actually using them in a
flextable
(as far as I can tell - I still need to confirm with my translators), so the issue is thus far limited toggplot2
. Thepkgload::unload
workaround serves me fine at the moment, but thought y'all might like to know something is up.The text was updated successfully, but these errors were encountered: