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

PdfExporter not supported Cyrillic #123

Open
vitalii-vov opened this issue May 4, 2022 · 2 comments
Open

PdfExporter not supported Cyrillic #123

vitalii-vov opened this issue May 4, 2022 · 2 comments

Comments

@vitalii-vov
Copy link

vitalii-vov commented May 4, 2022

Hello.
I'm trying to generate a PDF document from a graph using the PdfExporter class.

var exporter = new PdfExporter { Width = width, Height = height, Background = background };
exporter.Export(model, stream);

One of the axes contains Cyrillic characters

var yAxis = new LinearAxis
{
    Position = AxisPosition.Left,
    Title = "FHR, уд/мин" // <- Cyrillic symbols
};

Garbage is displayed instead of characters in the document
Снимок экрана 2022-05-04 в 16 53 56

I tried to solve this with the DefaultFont property, like here oxyplot/oxyplot#955
But it doesn't seem to work for xamarin?

@VisualMelon
Copy link

Which PDF exporter are you using? The one in the core library has poor unicode support, and it is generally better to use the one provided in OxyPlot.SkiaSharp which is a more complete implementation.

@vitalii-vov
Copy link
Author

vitalii-vov commented May 4, 2022

I am using PdfRenderer included in OxyPlot.Xamarin.Forms

If we use OxyPlot.SkiaSharp.PdfRenderer we will get an error:

Type OxyPlot.Xamarin.iOS.CoreGraphicsRenderContext has invalid vtable method slot 7 with method OxyPlot.RenderContextBase:DrawLine (System.Collections.Generic.IList`1<OxyPlot.ScreenPoint>,OxyPlot.OxyColor,double,OxyPlot.EdgeRenderingMode,double[] ,OxyPlot.LineJoin)

This error occurs when the application starts, since the regular OxyPlot.Xamarin.Forms library is used to display graphs
I tried to do this before, but because of this error, nothing worked for me.

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

2 participants