Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: trunk/include/ports/SkFontStyle.h

Issue 14305007: check-point for linux fontmgr impl (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 #ifndef SkFontStyle_DEFINED 8 #ifndef SkFontStyle_DEFINED
9 #define SkFontStyle_DEFINED 9 #define SkFontStyle_DEFINED
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 SkFontStyle(); 44 SkFontStyle();
45 SkFontStyle(int weight, int width, Slant); 45 SkFontStyle(int weight, int width, Slant);
46 46
47 bool operator==(const SkFontStyle& rhs) const { 47 bool operator==(const SkFontStyle& rhs) const {
48 return fUnion.fU32 == rhs.fUnion.fU32; 48 return fUnion.fU32 == rhs.fUnion.fU32;
49 } 49 }
50 50
51 int weight() const { return fUnion.fR.fWeight; } 51 int weight() const { return fUnion.fR.fWeight; }
52 int width() const { return fUnion.fR.fWidth; } 52 int width() const { return fUnion.fR.fWidth; }
53 Slant slant() const { return (Slant)fUnion.fR.fSlant; }
53 54
54 bool isItalic() const { 55 bool isItalic() const {
55 return kItalic_Slant == fUnion.fR.fSlant; 56 return kItalic_Slant == fUnion.fR.fSlant;
56 } 57 }
57 58
58 private: 59 private:
59 union { 60 union {
60 struct { 61 struct {
61 uint16_t fWeight; // 100 .. 900 62 uint16_t fWeight; // 100 .. 900
62 uint8_t fWidth; // 1 .. 9 63 uint8_t fWidth; // 1 .. 9
63 uint8_t fSlant; // 0 .. 2 64 uint8_t fSlant; // 0 .. 2
64 } fR; 65 } fR;
65 uint32_t fU32; 66 uint32_t fU32;
66 } fUnion; 67 } fUnion;
67 }; 68 };
68 69
69 #endif 70 #endif
OLDNEW
« no previous file with comments | « trunk/include/ports/SkFontConfigInterface.h ('k') | trunk/src/ports/SkFontConfigInterface_direct.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698