| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 "SkAdvancedTypefaceMetrics.h" | 8 #include "SkAdvancedTypefaceMetrics.h" |
| 9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 } | 707 } |
| 708 | 708 |
| 709 // rotated text looks bad with hinting, so we disable it as needed | 709 // rotated text looks bad with hinting, so we disable it as needed |
| 710 if (!isAxisAligned(*rec)) { | 710 if (!isAxisAligned(*rec)) { |
| 711 h = SkPaint::kNo_Hinting; | 711 h = SkPaint::kNo_Hinting; |
| 712 } | 712 } |
| 713 rec->setHinting(h); | 713 rec->setHinting(h); |
| 714 | 714 |
| 715 #ifndef SK_GAMMA_APPLY_TO_A8 | 715 #ifndef SK_GAMMA_APPLY_TO_A8 |
| 716 if (!isLCD(*rec)) { | 716 if (!isLCD(*rec)) { |
| 717 rec->ignorePreBlend(); | 717 // SRGBTODO: Is this correct? |
| 718 rec->ignorePreBlend(false); |
| 718 } | 719 } |
| 719 #endif | 720 #endif |
| 720 } | 721 } |
| 721 | 722 |
| 722 int SkTypeface_FreeType::onGetUPEM() const { | 723 int SkTypeface_FreeType::onGetUPEM() const { |
| 723 AutoFTAccess fta(this); | 724 AutoFTAccess fta(this); |
| 724 FT_Face face = fta.face(); | 725 FT_Face face = fta.face(); |
| 725 return face ? face->units_per_EM : 0; | 726 return face ? face->units_per_EM : 0; |
| 726 } | 727 } |
| 727 | 728 |
| (...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1814 SkDEBUGF(("Requested font axis not found: %s '%c%c%c%c'\n", | 1815 SkDEBUGF(("Requested font axis not found: %s '%c%c%c%c'\n", |
| 1815 name.c_str(), | 1816 name.c_str(), |
| 1816 (skTag >> 24) & 0xFF, | 1817 (skTag >> 24) & 0xFF, |
| 1817 (skTag >> 16) & 0xFF, | 1818 (skTag >> 16) & 0xFF, |
| 1818 (skTag >> 8) & 0xFF, | 1819 (skTag >> 8) & 0xFF, |
| 1819 (skTag) & 0xFF)); | 1820 (skTag) & 0xFF)); |
| 1820 } | 1821 } |
| 1821 } | 1822 } |
| 1822 ) | 1823 ) |
| 1823 } | 1824 } |
| OLD | NEW |