-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
System.Drawing.Common and RTL support #25573
Comments
It may work if libgdiplus on the system is built with Pango support. That's usually not the default though. |
@filipnavara can we fix this in libgdiplus to make it work by default? Marking as future as this is libgdiplus behavior. |
@safern I think that's a question for Linux distro maintainers. There are two text rendering backends in libgdiplus. The default one is using Cairo (https://cairographics.org/manual/cairo-text.html), which explicitly calls the text API unsatisfactory for any serious use:
The other one uses the Pango library for text layout and supports some more advanced scenarios. It's a matter of pushing the distributions to include this additional dependency and configuring the library with |
On a second thought I think most of the Linux distributions already have Pango installed, so maybe it should just be used when available without an extra configuration option. I am no expert on autoconf/automake to make that possible. Additionally, the Pango backend needs some serious testing. |
I have updated the Pango code in libgdiplus and submitted PRs for problems that I could find. It is still nowhere near as tested as the equivalent Cairo text rendering, so any help with that will be greatly appreciated. |
@filipnavara thanks for explaining and taking a look, it is really helpful to have active contributors fixing libgdiplus issues that we hit in our System.Drawing implementation :) I guess then this issue can be closed since it is an issue in libgdiplus and dependent to an external dependency we can't really do much from corefx side. |
Currently
System.Drawing.Common
version "4.5.0-preview1-26216-02" doesn't support RTL on operating systems other than Windows. Here is a sample to demonstrate this issue:SystemDrawingCommonRtlTest.csproj
fileProgram.cs
fileAnd here are its output
On Windows 10: It works correctly
On Linux (Ubuntu): Characters are separated and rotated
The text was updated successfully, but these errors were encountered: