Skip to content
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

Does not rendering some characters. #715

Open
N08I40K opened this issue Sep 4, 2021 · 0 comments
Open

Does not rendering some characters. #715

N08I40K opened this issue Sep 4, 2021 · 0 comments

Comments

@N08I40K
Copy link

N08I40K commented Sep 4, 2021

If the repeating characters are similar to these "𝑎 𝑑 𝑧 𝑢 𝔥", then the operation of drawing text on the picture does not occur, and subsequent ones too.

C# Example

string text = "𝑎 𝑑 𝑧 𝑢 𝔥";
using (Bitmap MainPicture = new Bitmap(1000, 500, PixelFormat.Format24bppRgb))
using (Rectangle TextRectangle1 = new Rectangle(25, 25, 950, 200))
using (Rectangle TextRectangle2 = new Rectangle(25, 250, 950, 200))
using (Graphics graph = Graphics.FromImage(MainPicture))
using (Font font = new Font("Arial", 35, FontStyle.Regular))
{
    graph.FillRectangle(Brushes.Black, FillRectangle);

    Console.WriteLine("TEXT: " + text);
    // Draw text
    graph.DrawString("\"" + text + "\"", font, Brushes.White, TextRectangle1, StringFormat.GenericTypographic);
    graph.DrawString("Normal text", font, Brushes.White, TextRectangle2, StringFormat.GenericTypographic);

    MainPicture.Save("path/to/picture.png", System.Drawing.Imaging.ImageFormat.Png);
}```

Configuration

Linux (KDE neon) x64/

The application compiles and runs on Linux. Mono 6.12.0.122 is used to run.
IDE: MonoDevelop 7.4.8 (build 2)

I think this is because of the character encoding. Windows-1251.

I did not find any workarounds. Suggestions to use other fonts (like "Cambria Math"), but it didn't help.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant