diff options
author | Cary Clark <caryclark@skia.org> | 2018-01-05 14:21:59 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-05 19:54:54 +0000 |
commit | 71961fb58d54884c7548a668502e988079da30fe (patch) | |
tree | 88a8a82236bda56f9564a1d07661ec77ec35290b /docs/SkPaint_Reference.bmh | |
parent | 721553a34e6be054d11120d92b8941384a9f222e (diff) |
change paint examples to use different font
monospace draws different from default, so
use that as the argument to SkTypeface::MakeFromName
in bookmaker examples
Docs-Preview: https://skia.org/?cl=91422
Bug: skia:7464
Change-Id: Id25a6b7ea146134c14f4ee3005a7e1caa7a38ba4
Reviewed-on: https://skia-review.googlesource.com/91422
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'docs/SkPaint_Reference.bmh')
-rw-r--r-- | docs/SkPaint_Reference.bmh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/SkPaint_Reference.bmh b/docs/SkPaint_Reference.bmh index f0a2d5fb92..b19feb29ed 100644 --- a/docs/SkPaint_Reference.bmh +++ b/docs/SkPaint_Reference.bmh @@ -3232,7 +3232,7 @@ implementation. void draw(SkCanvas* canvas) { SkPaint paint; SkDebugf("nullptr %c= typeface\n", paint.getTypeface() ? '!' : '='); - paint.setTypeface(SkTypeface::MakeFromName("Times New Roman", SkFontStyle())); + paint.setTypeface(SkTypeface::MakeFromName("monospace", SkFontStyle())); SkDebugf("nullptr %c= typeface\n", paint.getTypeface() ? '!' : '='); } @@ -3253,7 +3253,7 @@ implementation. #Example void draw(SkCanvas* canvas) { SkPaint paint1, paint2; - paint1.setTypeface(SkTypeface::MakeFromName("Times New Roman", + paint1.setTypeface(SkTypeface::MakeFromName("monospace", SkFontStyle(SkFontStyle::kNormal_Weight, SkFontStyle::kNormal_Width, SkFontStyle::kItalic_Slant))); SkDebugf("typeface1 %c= typeface2\n", @@ -3283,10 +3283,10 @@ typeface Reference_Count by one. #Height 64 void draw(SkCanvas* canvas) { SkPaint paint; - paint.setTypeface(SkTypeface::MakeFromName("Courier New", SkFontStyle())); - canvas->drawString("Courier New", 10, 30, paint); + paint.setTypeface(SkTypeface::MakeFromName("monospace", SkFontStyle())); + canvas->drawString("hamburgerfons", 10, 30, paint); paint.setTypeface(nullptr); - canvas->drawString("default", 10, 50, paint); + canvas->drawString("hamburgerfons", 10, 50, paint); } ## |