| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 typedef struct HFONT__ *HFONT; | 53 typedef struct HFONT__ *HFONT; |
| 54 | 54 |
| 55 namespace WebCore { | 55 namespace WebCore { |
| 56 | 56 |
| 57 // Return a typeface associated with the hfont, and return its size and | 57 // Return a typeface associated with the hfont, and return its size and |
| 58 // lfQuality from the hfont's LOGFONT. | 58 // lfQuality from the hfont's LOGFONT. |
| 59 PassRefPtr<SkTypeface> CreateTypefaceFromHFont(HFONT, int* size, int* paintTextF
lags); | 59 PassRefPtr<SkTypeface> CreateTypefaceFromHFont(HFONT, int* size, int* paintTextF
lags); |
| 60 | 60 |
| 61 class FontDescription; | 61 class FontDescription; |
| 62 class GraphicsContext; |
| 62 | 63 |
| 63 class FontPlatformData { | 64 class FontPlatformData { |
| 64 public: | 65 public: |
| 65 // Used for deleted values in the font cache's hash tables. The hash table | 66 // 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 | 67 // 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 | 68 // to this "Deleted" one. It expects the Deleted one to be differentiable |
| 68 // from the NULL one (created with the empty constructor), so we can't just | 69 // from the NULL one (created with the empty constructor), so we can't just |
| 69 // set everything to NULL. | 70 // set everything to NULL. |
| 70 FontPlatformData(WTF::HashTableDeletedValueType); | 71 FontPlatformData(WTF::HashTableDeletedValueType); |
| 71 FontPlatformData(); | 72 FontPlatformData(); |
| 72 // This constructor takes ownership of the HFONT | 73 // This constructor takes ownership of the HFONT |
| 73 FontPlatformData(HFONT, float size, FontOrientation); | 74 FontPlatformData(HFONT, float size, FontOrientation); |
| 74 FontPlatformData(float size, bool bold, bool oblique); | 75 FontPlatformData(float size, bool bold, bool oblique); |
| 75 FontPlatformData(const FontPlatformData&); | 76 FontPlatformData(const FontPlatformData&); |
| 76 FontPlatformData(const FontPlatformData&, float textSize); | 77 FontPlatformData(const FontPlatformData&, float textSize); |
| 77 FontPlatformData(SkTypeface*, const char* name, float textSize, bool fakeBol
d, bool fakeItalic, FontOrientation = Horizontal); | 78 FontPlatformData(SkTypeface*, const char* name, float textSize, bool fakeBol
d, bool fakeItalic, FontOrientation = Horizontal); |
| 78 | 79 |
| 79 #if !ENABLE(GDI_FONTS_ON_WINDOWS) | 80 void setupPaint(SkPaint*, GraphicsContext* = 0) const; |
| 80 void setupPaint(SkPaint*) const; | |
| 81 #endif | |
| 82 | 81 |
| 83 FontPlatformData& operator=(const FontPlatformData&); | 82 FontPlatformData& operator=(const FontPlatformData&); |
| 84 | 83 |
| 85 bool isHashTableDeletedValue() const { return m_isHashTableDeletedValue; } | 84 bool isHashTableDeletedValue() const { return m_isHashTableDeletedValue; } |
| 86 | 85 |
| 87 ~FontPlatformData(); | 86 ~FontPlatformData(); |
| 88 | 87 |
| 89 bool isFixedPitch() const; | 88 bool isFixedPitch() const; |
| 90 HFONT hfont() const { return m_font ? m_font->hfont() : 0; } | 89 HFONT hfont() const { return m_font ? m_font->hfont() : 0; } |
| 91 float size() const { return m_size; } | 90 float size() const { return m_size; } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 163 |
| 165 mutable SCRIPT_CACHE m_scriptCache; | 164 mutable SCRIPT_CACHE m_scriptCache; |
| 166 mutable OwnPtr<SCRIPT_FONTPROPERTIES> m_scriptFontProperties; | 165 mutable OwnPtr<SCRIPT_FONTPROPERTIES> m_scriptFontProperties; |
| 167 | 166 |
| 168 bool m_isHashTableDeletedValue; | 167 bool m_isHashTableDeletedValue; |
| 169 }; | 168 }; |
| 170 | 169 |
| 171 } // WebCore | 170 } // WebCore |
| 172 | 171 |
| 173 #endif // FontPlatformDataChromiumWin_h | 172 #endif // FontPlatformDataChromiumWin_h |
| OLD | NEW |