[canvaskit] Use linear metrics in shaping demo
Subpixel and slight hinting also make a big difference. Change-Id: I1b942caf20dbdcf8bebc3504695c673fbe7e4392 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319791 Reviewed-by: Ben Wagner <bungeman@google.com>
This commit is contained in:
parent
435b482638
commit
f95c8629d1
@ -59,6 +59,10 @@
|
||||
|
||||
const textPaint = new CanvasKit.SkPaint();
|
||||
const textFont = new CanvasKit.SkFont(typeface, 20);
|
||||
textFont.setLinearMetrics(true);
|
||||
textFont.setSubpixel(true);
|
||||
textFont.setHinting(CanvasKit.FontHinting.Slight);
|
||||
|
||||
|
||||
// Only care about these characters for now. If we get any unknown characters, we'll replace
|
||||
// them with the first glyph here (the replacement glyph).
|
||||
|
Loading…
Reference in New Issue
Block a user