OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007 Apple Computer, Inc. | 2 * Copyright (C) 2006, 2007 Apple Computer, Inc. |
3 * Copyright (c) 2006, 2007, 2008, 2009, Google Inc. All rights reserved. | 3 * Copyright (c) 2006, 2007, 2008, 2009, Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "wtf/RefPtr.h" | 46 #include "wtf/RefPtr.h" |
47 #include "wtf/text/StringImpl.h" | 47 #include "wtf/text/StringImpl.h" |
48 | 48 |
49 #include <usp10.h> | 49 #include <usp10.h> |
50 | 50 |
51 typedef struct HFONT__ *HFONT; | 51 typedef struct HFONT__ *HFONT; |
52 | 52 |
53 namespace WebCore { | 53 namespace WebCore { |
54 | 54 |
55 // Return a typeface associated with the hfont, and return its size and | 55 // Return a typeface associated with the hfont, and return its size and |
56 // lfQuality from the hfont's LOGFONT. | 56 // from the hfont's LOGFONT. |
57 PassRefPtr<SkTypeface> CreateTypefaceFromHFont(HFONT, int* size, int* paintTextF
lags); | 57 PassRefPtr<SkTypeface> CreateTypefaceFromHFont(HFONT, int* size); |
58 | 58 |
59 class FontDescription; | 59 class FontDescription; |
60 class GraphicsContext; | 60 class GraphicsContext; |
61 class HarfBuzzFace; | 61 class HarfBuzzFace; |
62 | 62 |
63 class PLATFORM_EXPORT FontPlatformData { | 63 class PLATFORM_EXPORT FontPlatformData { |
64 public: | 64 public: |
65 // Used for deleted values in the font cache's hash tables. The hash table | 65 // Used for deleted values in the font cache's hash tables. The hash table |
66 // will create us with this structure, and it will compare other values | 66 // will create us with this structure, and it will compare other values |
67 // to this "Deleted" one. It expects the Deleted one to be differentiable | 67 // to this "Deleted" one. It expects the Deleted one to be differentiable |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 }; | 166 }; |
167 | 167 |
168 RefPtr<RefCountedHFONT> m_font; | 168 RefPtr<RefCountedHFONT> m_font; |
169 #endif // !USE(HARFBUZZ) | 169 #endif // !USE(HARFBUZZ) |
170 float m_textSize; // Point size of the font in pixels. | 170 float m_textSize; // Point size of the font in pixels. |
171 FontOrientation m_orientation; | 171 FontOrientation m_orientation; |
172 bool m_syntheticBold; | 172 bool m_syntheticBold; |
173 bool m_syntheticItalic; | 173 bool m_syntheticItalic; |
174 | 174 |
175 RefPtr<SkTypeface> m_typeface; | 175 RefPtr<SkTypeface> m_typeface; |
176 int m_paintTextFlags; | |
177 | 176 |
178 #if USE(HARFBUZZ) | 177 #if USE(HARFBUZZ) |
179 mutable RefPtr<HarfBuzzFace> m_harfBuzzFace; | 178 mutable RefPtr<HarfBuzzFace> m_harfBuzzFace; |
180 #else | 179 #else |
181 mutable SCRIPT_CACHE m_scriptCache; | 180 mutable SCRIPT_CACHE m_scriptCache; |
182 mutable OwnPtr<SCRIPT_FONTPROPERTIES> m_scriptFontProperties; | 181 mutable OwnPtr<SCRIPT_FONTPROPERTIES> m_scriptFontProperties; |
183 #endif | 182 #endif |
184 | 183 |
185 bool m_isHashTableDeletedValue; | 184 bool m_isHashTableDeletedValue; |
186 bool m_useSubpixelPositioning; | 185 bool m_useSubpixelPositioning; |
187 }; | 186 }; |
188 | 187 |
189 } // WebCore | 188 } // WebCore |
190 | 189 |
191 #endif // FontPlatformDataChromiumWin_h | 190 #endif // FontPlatformDataChromiumWin_h |
OLD | NEW |