1 /* 2 * Copyright 2018 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef SkFontTypes_DEFINED 9 #define SkFontTypes_DEFINED 10 11 #include "SkTypes.h" 12 // remove me once google3 uses IWYU 13 #include "SkTypeface.h" 14 15 enum class SkTextEncoding { 16 kUTF8, //!< uses bytes to represent UTF-8 or ASCII 17 kUTF16, //!< uses two byte words to represent most of Unicode 18 kUTF32, //!< uses four byte words to represent all of Unicode 19 kGlyphID, //!< uses two byte words to represent glyph indices 20 }; 21 22 #define kUTF8_SkTextEncoding SkTextEncoding::kUTF8 23 #define kUTF16_SkTextEncoding SkTextEncoding::kUTF16 24 #define kUTF32_SkTextEncoding SkTextEncoding::kUTF32 25 #define kGlyphID_SkTextEncoding SkTextEncoding::kGlyphID 26 27 enum class SkFontHinting { 28 kNone, //!< glyph outlines unchanged 29 kSlight, //!< minimal modification to improve constrast 30 kNormal, //!< glyph outlines modified to improve constrast 31 kFull, //!< modifies glyph outlines for maximum constrast 32 }; 33 34 #define kNo_SkFontHinting SkFontHinting::kNone 35 #define kSlight_SkFontHinting SkFontHinting::kSlight 36 #define kNormal_SkFontHinting SkFontHinting::kNormal 37 #define kFull_SkFontHinting SkFontHinting::kFull 38 39 #endif 40