Skip to content

Commit 493c28d

Browse files
committed
SKIA text: enable subpixel anti-aliasing
1 parent 9293757 commit 493c28d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

IGraphics/Drawing/IGraphicsSkia.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@ void IGraphicsSkia::PrepareAndMeasureText(const IText& text, const char* str, IR
586586
float IGraphicsSkia::DoMeasureText(const IText& text, const char* str, IRECT& bounds) const
587587
{
588588
SkFont font;
589+
font.setEdging(SkFont::Edging::kSubpixelAntiAlias);
589590

590591
IRECT r = bounds;
591592
double x, y;
@@ -599,8 +600,10 @@ void IGraphicsSkia::DoDrawText(const IText& text, const char* str, const IRECT&
599600
IRECT measured = bounds;
600601

601602
SkFont font;
603+
font.setEdging(SkFont::Edging::kSubpixelAntiAlias);
604+
602605
double x, y;
603-
606+
604607
PrepareAndMeasureText(text, str, measured, x, y, font);
605608
PathTransformSave();
606609
DoTextRotation(text, bounds, measured);

0 commit comments

Comments
 (0)