• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1  #if 0  // Disabled until updated to use current API.
2  // Copyright 2019 Google LLC.
3  // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4  #include "tools/fiddle/examples.h"
5  // HASH=0e6fbb7773cd925b274552f4cd1abef2
6  REG_FIDDLE(Paint_setTypeface, 256, 64, false, 0) {
7  void draw(SkCanvas* canvas) {
8      SkPaint paint;
9      paint.setTypeface(SkTypeface::MakeFromName("monospace", SkFontStyle()));
10      canvas->drawString("hamburgerfons", 10, 30, paint);
11      paint.setTypeface(nullptr);
12      canvas->drawString("hamburgerfons", 10, 50, paint);
13  }
14  }  // END FIDDLE
15  #endif  // Disabled until updated to use current API.
16