Description
Particular text width is calculated wrongly when using skiasharp to measure the text size.
Got the same result when using with SKTypeface.FromStream and SKTypeface.FromFamilyName.
Code
SKPaint paint = new SKPaint();
paint.Typeface = SKTypeface.FromFamilyName("B Sina",SKTypefaceStyle.Normal);
paint.TextSize = 11;
float size = paint.MeasureText("爻賱丕賲 丿賳蹖丕");
Expected Behavior
The width of the text should be same as GDI measure.
Expected Width
| --
49.2260742
Actual Behavior
Actual Width
| --
63
Basic Information
Version with issue: 1.59.3
IDE: Visual studio 2017
Platform Target Frameworks: .NET Core 2.0
Are you sure that GDI isn't shaping the text?
I think @Gillibald is right, SkiaSharp does not actually do any text shaping - and will always be wrong.
I would suggest having a look at https://github.com/toptensoftware/RichTextKit to draw text in SkiaSharp.
We are having a look at what we can do to improve text in SkiaSharp, but for now the best option is probably RichTextKit as that does probably more than what SkiaSharp will ever do,
Have you considered adding README links to other libraries that are useful? I wouldn't have known about RichTextKit or the SVG one (I already forgot its name, hah) without watching this repo.
Hehe, I think I must. I _just_ found out about them recently as well. I'll update the readme - I think it is a bit old right now...
Most helpful comment
Hehe, I think I must. I _just_ found out about them recently as well. I'll update the readme - I think it is a bit old right now...