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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 public: | 69 public: |
70 // Used for deleted values in the font cache's hash tables. The hash table | 70 // Used for deleted values in the font cache's hash tables. The hash table |
71 // will create us with this structure, and it will compare other values | 71 // will create us with this structure, and it will compare other values |
72 // to this "Deleted" one. It expects the Deleted one to be differentiable | 72 // to this "Deleted" one. It expects the Deleted one to be differentiable |
73 // from the 0 one (created with the empty constructor), so we can't just | 73 // from the 0 one (created with the empty constructor), so we can't just |
74 // set everything to 0. | 74 // set everything to 0. |
75 FontPlatformData(WTF::HashTableDeletedValueType); | 75 FontPlatformData(WTF::HashTableDeletedValueType); |
76 FontPlatformData(); | 76 FontPlatformData(); |
77 FontPlatformData(const FontPlatformData&); | 77 FontPlatformData(const FontPlatformData&); |
78 FontPlatformData(float size, bool syntheticBold, bool syntheticItalic, FontO
rientation = Horizontal, FontWidthVariant = RegularWidth); | 78 FontPlatformData(float size, bool syntheticBold, bool syntheticItalic, FontO
rientation = Horizontal, FontWidthVariant = RegularWidth); |
| 79 FontPlatformData(const FontPlatformData& src, float textSize); |
79 #if OS(MACOSX) | 80 #if OS(MACOSX) |
80 FontPlatformData(NSFont*, float size, bool syntheticBold = false, bool synth
eticItalic = false, | 81 FontPlatformData(NSFont*, float size, bool syntheticBold = false, bool synth
eticItalic = false, |
81 FontOrientation = Horizontal, FontWidthVariant = RegularWid
th); | 82 FontOrientation = Horizontal, FontWidthVariant = RegularWid
th); |
82 FontPlatformData(CGFontRef, float size, bool syntheticBold, bool syntheticOb
lique, FontOrientation, FontWidthVariant); | 83 FontPlatformData(CGFontRef, float size, bool syntheticBold, bool syntheticOb
lique, FontOrientation, FontWidthVariant); |
83 #else | 84 #else |
84 FontPlatformData(PassRefPtr<SkTypeface>, const char* name, float textSize, b
ool syntheticBold, bool syntheticItalic, FontOrientation = Horizontal, bool subp
ixelTextPosition = defaultUseSubpixelPositioning()); | 85 FontPlatformData(PassRefPtr<SkTypeface>, const char* name, float textSize, b
ool syntheticBold, bool syntheticItalic, FontOrientation = Horizontal, bool subp
ixelTextPosition = defaultUseSubpixelPositioning()); |
85 FontPlatformData(const FontPlatformData& src, float textSize); | |
86 #endif | 86 #endif |
87 ~FontPlatformData(); | 87 ~FontPlatformData(); |
88 | 88 |
89 #if OS(MACOSX) | 89 #if OS(MACOSX) |
90 NSFont* font() const { return m_font; } | 90 NSFont* font() const { return m_font; } |
91 void setFont(NSFont*); | 91 void setFont(NSFont*); |
92 | 92 |
93 CGFontRef cgFont() const { return m_cgFont.get(); } | 93 CGFontRef cgFont() const { return m_cgFont.get(); } |
94 CTFontRef ctFont() const; | 94 CTFontRef ctFont() const; |
95 | 95 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 bool fontContainsCharacter(UChar32 character); | 135 bool fontContainsCharacter(UChar32 character); |
136 | 136 |
137 #if ENABLE(OPENTYPE_VERTICAL) | 137 #if ENABLE(OPENTYPE_VERTICAL) |
138 PassRefPtr<OpenTypeVerticalData> verticalData() const; | 138 PassRefPtr<OpenTypeVerticalData> verticalData() const; |
139 PassRefPtr<SharedBuffer> openTypeTable(uint32_t table) const; | 139 PassRefPtr<SharedBuffer> openTypeTable(uint32_t table) const; |
140 #endif | 140 #endif |
141 | 141 |
142 #if !OS(MACOSX) | 142 #if !OS(MACOSX) |
143 // The returned styles are all actual styles without FontRenderStyle::NoPref
erence. | 143 // The returned styles are all actual styles without FontRenderStyle::NoPref
erence. |
144 const FontRenderStyle& fontRenderStyle() const { return m_style; } | 144 const FontRenderStyle& fontRenderStyle() const { return m_style; } |
| 145 #endif |
145 void setupPaint(SkPaint*, GraphicsContext* = 0) const; | 146 void setupPaint(SkPaint*, GraphicsContext* = 0) const; |
146 #endif | |
147 | 147 |
148 #if OS(WIN) | 148 #if OS(WIN) |
149 int paintTextFlags() const { return m_paintTextFlags; } | 149 int paintTextFlags() const { return m_paintTextFlags; } |
150 #else | 150 #else |
151 static void setHinting(SkPaint::Hinting); | 151 static void setHinting(SkPaint::Hinting); |
152 static void setAutoHint(bool); | 152 static void setAutoHint(bool); |
153 static void setUseBitmaps(bool); | 153 static void setUseBitmaps(bool); |
154 static void setAntiAlias(bool); | 154 static void setAntiAlias(bool); |
155 static void setSubpixelRendering(bool); | 155 static void setSubpixelRendering(bool); |
156 #endif | 156 #endif |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 int m_paintTextFlags; | 203 int m_paintTextFlags; |
204 bool m_useSubpixelPositioning; | 204 bool m_useSubpixelPositioning; |
205 unsigned m_minSizeForAntiAlias; | 205 unsigned m_minSizeForAntiAlias; |
206 float m_minSizeForSubpixel; | 206 float m_minSizeForSubpixel; |
207 #endif | 207 #endif |
208 }; | 208 }; |
209 | 209 |
210 } // namespace blink | 210 } // namespace blink |
211 | 211 |
212 #endif // ifdef FontPlatformData_h | 212 #endif // ifdef FontPlatformData_h |
OLD | NEW |