Skip to content

Commit

Permalink
Improved: Enabled antialiased text (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
daanggc authored Apr 23, 2024
1 parent cb12101 commit 7c5407d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public override void Draw(ZplElementBase element, DrawerOptions options)
}

var skFont = new SKFont(typeface, fontSize, scaleX);
using var skPaint = new SKPaint(skFont);
using var skPaint = new SKPaint(skFont) { IsAntialias = true, };
var textBoundBaseline = new SKRect();
skPaint.MeasureText("X", ref textBoundBaseline);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public override void Draw(ZplElementBase element, DrawerOptions options)
var typeface = options.FontLoader(font.FontName);

var skFont = new SKFont(typeface, fontSize, scaleX);
using var skPaint = new SKPaint(skFont);
using var skPaint = new SKPaint(skFont) { IsAntialias = true, };

string displayText = textField.Text;
if (textField.UseHexadecimalIndicator)
Expand Down

0 comments on commit 7c5407d

Please sign in to comment.