OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2006, 2007, 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2006, 2007, 2008, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 // ------------------------------------------------------------------------- | 87 // ------------------------------------------------------------------------- |
88 // Return Skia's unique id for this font. This encodes both the style and | 88 // Return Skia's unique id for this font. This encodes both the style and |
89 // the font's file name so refers to a single face. | 89 // the font's file name so refers to a single face. |
90 // ------------------------------------------------------------------------- | 90 // ------------------------------------------------------------------------- |
91 SkFontID uniqueID() const; | 91 SkFontID uniqueID() const; |
92 SkTypeface* typeface() const { return m_typeface.get(); } | 92 SkTypeface* typeface() const { return m_typeface.get(); } |
93 | 93 |
94 unsigned hash() const; | 94 unsigned hash() const; |
95 float size() const { return m_textSize; } | 95 float size() const { return m_textSize; } |
96 int emSizeInFontUnits() const; | |
97 | 96 |
98 FontOrientation orientation() const { return m_orientation; } | 97 FontOrientation orientation() const { return m_orientation; } |
99 void setOrientation(FontOrientation orientation) { m_orientation = orientati
on; } | 98 void setOrientation(FontOrientation orientation) { m_orientation = orientati
on; } |
100 void setSyntheticBold(bool syntheticBold) { m_syntheticBold = syntheticBold;
} | 99 void setSyntheticBold(bool syntheticBold) { m_syntheticBold = syntheticBold;
} |
101 void setSyntheticItalic(bool syntheticItalic) { m_syntheticItalic = syntheti
cItalic; } | 100 void setSyntheticItalic(bool syntheticItalic) { m_syntheticItalic = syntheti
cItalic; } |
102 bool operator==(const FontPlatformData&) const; | 101 bool operator==(const FontPlatformData&) const; |
103 FontPlatformData& operator=(const FontPlatformData&); | 102 FontPlatformData& operator=(const FontPlatformData&); |
104 bool isHashTableDeletedValue() const { return m_isHashTableDeletedValue; } | 103 bool isHashTableDeletedValue() const { return m_isHashTableDeletedValue; } |
105 | 104 |
106 #if ENABLE(OPENTYPE_VERTICAL) | 105 #if ENABLE(OPENTYPE_VERTICAL) |
(...skipping 19 matching lines...) Expand all Loading... |
126 static void setAntiAlias(bool); | 125 static void setAntiAlias(bool); |
127 static void setSubpixelRendering(bool); | 126 static void setSubpixelRendering(bool); |
128 | 127 |
129 private: | 128 private: |
130 void getRenderStyleForStrike(const char*, int); | 129 void getRenderStyleForStrike(const char*, int); |
131 void querySystemForRenderStyle(bool useSkiaSubpixelPositioning); | 130 void querySystemForRenderStyle(bool useSkiaSubpixelPositioning); |
132 | 131 |
133 RefPtr<SkTypeface> m_typeface; | 132 RefPtr<SkTypeface> m_typeface; |
134 CString m_family; | 133 CString m_family; |
135 float m_textSize; | 134 float m_textSize; |
136 mutable int m_emSizeInFontUnits; | |
137 bool m_syntheticBold; | 135 bool m_syntheticBold; |
138 bool m_syntheticItalic; | 136 bool m_syntheticItalic; |
139 FontOrientation m_orientation; | 137 FontOrientation m_orientation; |
140 FontRenderStyle m_style; | 138 FontRenderStyle m_style; |
141 mutable RefPtr<HarfBuzzFace> m_harfBuzzFace; | 139 mutable RefPtr<HarfBuzzFace> m_harfBuzzFace; |
142 bool m_isHashTableDeletedValue; | 140 bool m_isHashTableDeletedValue; |
143 }; | 141 }; |
144 | 142 |
145 } // namespace WebCore | 143 } // namespace WebCore |
146 | 144 |
147 #endif // ifdef FontPlatformDataHarfBuzz_h | 145 #endif // ifdef FontPlatformDataHarfBuzz_h |
OLD | NEW |