| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkFont.h" | 8 #include "SkFont.h" |
| 9 #include "SkPaint.h" | 9 #include "SkPaint.h" |
| 10 #include "SkTypeface.h" | 10 #include "SkTypeface.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 REPORTER_ASSERT(reporter, font->isVertical() == paint.isVerticalText()); | 36 REPORTER_ASSERT(reporter, font->isVertical() == paint.isVerticalText()); |
| 37 REPORTER_ASSERT(reporter, font->isEmbolden() == paint.isFakeBoldText()); | 37 REPORTER_ASSERT(reporter, font->isEmbolden() == paint.isFakeBoldText()); |
| 38 | 38 |
| 39 REPORTER_ASSERT(reporter, font->isUseNonLinearMetrics() == is_use_nonlinear_
metrics(paint)); | 39 REPORTER_ASSERT(reporter, font->isUseNonLinearMetrics() == is_use_nonlinear_
metrics(paint)); |
| 40 REPORTER_ASSERT(reporter, font->isEnableAutoHints() == is_enable_auto_hints(
paint)); | 40 REPORTER_ASSERT(reporter, font->isEnableAutoHints() == is_enable_auto_hints(
paint)); |
| 41 REPORTER_ASSERT(reporter, font->isEnableByteCodeHints() == is_enable_bytecod
e_hints(paint)); | 41 REPORTER_ASSERT(reporter, font->isEnableByteCodeHints() == is_enable_bytecod
e_hints(paint)); |
| 42 } | 42 } |
| 43 | 43 |
| 44 static void test_cachedfont(skiatest::Reporter* reporter) { | 44 static void test_cachedfont(skiatest::Reporter* reporter) { |
| 45 static const char* const faces[] = { | 45 static const char* const faces[] = { |
| 46 NULL, // default font | 46 nullptr, // default font |
| 47 "Arial", "Times", "Times New Roman", "Helvetica", "Courier", | 47 "Arial", "Times", "Times New Roman", "Helvetica", "Courier", |
| 48 "Courier New", "Verdana", "monospace", | 48 "Courier New", "Verdana", "monospace", |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 static const struct { | 51 static const struct { |
| 52 SkPaint::Hinting hinting; | 52 SkPaint::Hinting hinting; |
| 53 unsigned flags; | 53 unsigned flags; |
| 54 } settings[] = { | 54 } settings[] = { |
| 55 { SkPaint::kNo_Hinting, 0 }, | 55 { SkPaint::kNo_Hinting, 0 }, |
| 56 { SkPaint::kNo_Hinting, SkPaint::kLinearText_Flag }, | 56 { SkPaint::kNo_Hinting, SkPaint::kLinearText_Flag }, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 | 115 |
| 116 DEF_TEST(FontObj, reporter) { | 116 DEF_TEST(FontObj, reporter) { |
| 117 test_cachedfont(reporter); | 117 test_cachedfont(reporter); |
| 118 } | 118 } |
| 119 | 119 |
| 120 // need tests for SkStrSearch | 120 // need tests for SkStrSearch |
| OLD | NEW |