Closed ufukhawk closed 3 years ago
there is no answer to this question?
What platform is that? Which device?
Platform is iOS. All iOS device.
I will take a look over the weekend if you want. Otherwise, you can try checking the code on your own. I don't suppose Rebeca will appear & help you :-(
My iOS renderer Code. ' protected void DrawText(CGContext g, Pattern p, CGRect r) { if (string.IsNullOrEmpty(p.Text)) return;//Copperplate-Light" KohinoorTelugu-Light string fontname = Device.Idiom == TargetIdiom.Tablet ? "Helvetica" : "GillSans-UltraBold";//GillSans-UltraBold var bounds = p.Text.StringSize(UIFont.FromName(fontname, p.TextSize)); //"GillSans-UltraBold var al = (int)p.TextAlign; var x = r.X; if ((al & 2) == 2) // center { x = r.X + (int)Math.Round(r.Width / 2.0) - (int)Math.Round(bounds.Width / 2.0); } else if ((al & 4) == 4) // right { x = (r.X + r.Width) - bounds.Width - 2; } var y = r.Y + (int)Math.Round(bounds.Height / 2.0) + 2; if ((al & 16) == 16) // middle { y = r.Y + (int)Math.Ceiling(r.Height / 2.0) + (int)Math.Round(bounds.Height / 5.0); } else if ((al & 32) == 32) // bottom { y = (r.Y + r.Height) - 2; }
g.SaveState();
g.SetAllowsFontSmoothing(true);
g.SetAllowsFontSubpixelQuantization(true);
g.SetAllowsAntialiasing(true);
g.SetShouldSmoothFonts(true);
g.SetShouldAntialias(true);
g.InterpolationQuality = CGInterpolationQuality.High;
g.SetShouldSubpixelPositionFonts(true);
g.SetAllowsSubpixelPositioning(true);
g.SetLineCap(CGLineCap.Square);
g.SetFlatness(1f);
g.TranslateCTM(0, Bounds.Height);
g.ScaleCTM(1, -1);
g.SetStrokeColor(p.TextColor.ToCGColor());
g.DrawPath(CGPathDrawingMode.EOFillStroke);
g.SetFillColor(p.TextColor.ToCGColor());
g.SetTextDrawingMode(CGTextDrawingMode.FillStroke);
g.SelectFont(fontname, p.TextSize, CGTextEncoding.MacRoman);
g.ShowTextAtPoint(x, Bounds.Height - y, p.Text,p.Text.Length);
g.RestoreState();
}
}'
@lubiepomaranczki okay, thanks :(
can you make a sample repo with this issue?
The text that I added to the special days in the calendar appears to be extremely blurred when working in ios mode, there is no error in Android mode.