diff options
author | 2014-10-20 12:54:31 -0700 | |
---|---|---|
committer | 2014-10-20 12:54:31 -0700 | |
commit | 802ad83dca2efd57fde6c7ba666555ea78b5324c (patch) | |
tree | de3ef90d0e9906ee2c16388b58e17e12976d833b /include/core/SkFontStyle.h | |
parent | 43b8b36b20ae00e2d78421c4cda1f3f922983a20 (diff) |
Revert of Replace SkTypeface::Style with SkFontStyle. (patchset #9 id:160001 of https://codereview.chromium.org/488143002/)
Reason for revert:
CrOS GM failures:
[*] 2 ExpectationsMismatch: fontmgr_iter_565.png fontmgr_iter_8888.png
Original issue's description:
> Replace SkTypeface::Style with SkFontStyle.
>
> Committed: https://skia.googlesource.com/skia/+/43b8b36b20ae00e2d78421c4cda1f3f922983a20
TBR=reed@google.com,bungeman@google.com
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/667023002
Diffstat (limited to 'include/core/SkFontStyle.h')
-rw-r--r-- | include/core/SkFontStyle.h | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/include/core/SkFontStyle.h b/include/core/SkFontStyle.h deleted file mode 100644 index f42d7dd470..0000000000 --- a/include/core/SkFontStyle.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2013 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SkFontStyle_DEFINED -#define SkFontStyle_DEFINED - -#include "SkTypes.h" - -class SK_API SkFontStyle { -public: - enum Weight { - kThin_Weight = 100, - kExtraLight_Weight = 200, - kLight_Weight = 300, - kNormal_Weight = 400, - kMedium_Weight = 500, - kSemiBold_Weight = 600, - kBold_Weight = 700, - kExtraBold_Weight = 800, - kBlack_Weight = 900 - }; - - enum Width { - kUltraCondensed_Width = 1, - kExtraCondensed_Width = 2, - kCondensed_Width = 3, - kSemiCondensed_Width = 4, - kNormal_Width = 5, - kSemiExpanded_Width = 6, - kExpanded_Width = 7, - kExtraExpanded_Width = 8, - kUltaExpanded_Width = 9 - }; - - enum Slant { - kUpright_Slant, - kItalic_Slant, - }; - - SkFontStyle(); - SkFontStyle(int weight, int width, Slant); - /** oldStyle means the style-bits in SkTypeface::Style: bold=1, italic=2 */ - explicit SkFontStyle(unsigned oldStyle); - - bool operator==(const SkFontStyle& rhs) const { - return fUnion.fU32 == rhs.fUnion.fU32; - } - - int weight() const { return fUnion.fR.fWeight; } - int width() const { return fUnion.fR.fWidth; } - Slant slant() const { return (Slant)fUnion.fR.fSlant; } - - bool isItalic() const { - return kItalic_Slant == fUnion.fR.fSlant; - } - -private: - union { - struct { - uint16_t fWeight; // 100 .. 900 - uint8_t fWidth; // 1 .. 9 - uint8_t fSlant; // 0 .. 2 - } fR; - uint32_t fU32; - } fUnion; -}; - -#endif |