MCPcopy Create free account
hub / github.com/HumbleUI/Skija / drawModes

Method drawModes

examples/scenes/src/FontScene.java:275–298  ·  view source on GitHub ↗
(Canvas canvas, float dpi)

Source from the content-addressed store, hash-verified

273 }
274
275 public void drawModes(Canvas canvas, float dpi) {
276 String common = "1006 Component Fix Position Scrolling ";
277
278 for (var pair: new Pair[] {
279 new Pair<>("", _inter),
280 new Pair<>(" Hinted", _interHinted),
281 new Pair<>(" Variable", _interV),})
282 {
283 try (var font = new Font((Typeface) pair.getSecond(), 11 * dpi);) {
284 var name = "Inter 11" + pair.getFirst();
285
286 _drawLine(canvas, common + name, font);
287
288 font.setSubpixel(true);
289 _drawLine(canvas, common + name + " Subpixel", font);
290
291 font.setSubpixel(false).setMetricsLinear(true);
292 _drawLine(canvas, common + name + " Linear", font);
293
294 font.setSubpixel(true);
295 _drawLine(canvas, common + name + " Subpixel Linear", font);
296 }
297 }
298 }
299
300 @Override
301 public boolean scale() {

Callers 1

drawMethod · 0.95

Calls 3

_drawLineMethod · 0.95
setSubpixelMethod · 0.80
setMetricsLinearMethod · 0.80

Tested by

no test coverage detected