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

Side by Side Diff: Source/core/platform/graphics/chromium/FontPlatformDataChromiumWin.h

Issue 21353004: Use Skia for font selection on windows (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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
OLDNEW
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 16 matching lines...) Expand all
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 #ifndef FontPlatformDataChromiumWin_h 32 #ifndef FontPlatformDataChromiumWin_h
33 #define FontPlatformDataChromiumWin_h 33 #define FontPlatformDataChromiumWin_h
34 34
35 #include "config.h" 35 #include "config.h"
36 36
37 #include "../ports/SkTypeface_win.h"
37 #include "SkPaint.h" 38 #include "SkPaint.h"
38 #include "SkTypeface.h" 39 #include "SkTypeface.h"
39 #include "core/platform/SharedBuffer.h" 40 #include "core/platform/SharedBuffer.h"
40 #include "core/platform/graphics/FontOrientation.h" 41 #include "core/platform/graphics/FontOrientation.h"
41 #include "core/platform/graphics/opentype/OpenTypeVerticalData.h" 42 #include "core/platform/graphics/opentype/OpenTypeVerticalData.h"
42 #include "wtf/Forward.h" 43 #include "wtf/Forward.h"
43 #include "wtf/HashTableDeletedValueType.h" 44 #include "wtf/HashTableDeletedValueType.h"
44 #include "wtf/OwnPtr.h" 45 #include "wtf/OwnPtr.h"
45 #include "wtf/PassRefPtr.h" 46 #include "wtf/PassRefPtr.h"
46 #include "wtf/RefCounted.h" 47 #include "wtf/RefCounted.h"
(...skipping 19 matching lines...) Expand all
66 // 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
67 // from the NULL one (created with the empty constructor), so we can't just 68 // from the NULL one (created with the empty constructor), so we can't just
68 // set everything to NULL. 69 // set everything to NULL.
69 FontPlatformData(WTF::HashTableDeletedValueType); 70 FontPlatformData(WTF::HashTableDeletedValueType);
70 FontPlatformData(); 71 FontPlatformData();
71 // This constructor takes ownership of the HFONT 72 // This constructor takes ownership of the HFONT
72 FontPlatformData(HFONT, float size, FontOrientation); 73 FontPlatformData(HFONT, float size, FontOrientation);
73 FontPlatformData(float size, bool bold, bool oblique); 74 FontPlatformData(float size, bool bold, bool oblique);
74 FontPlatformData(const FontPlatformData&); 75 FontPlatformData(const FontPlatformData&);
75 FontPlatformData(const FontPlatformData&, float textSize); 76 FontPlatformData(const FontPlatformData&, float textSize);
77 FontPlatformData(SkTypeface*, const char* name, float textSize, bool fakeBol d, bool fakeItalic, FontOrientation = Horizontal);
76 78
77 #if !ENABLE(GDI_FONTS_ON_WINDOWS) 79 #if !ENABLE(GDI_FONTS_ON_WINDOWS)
78 void setupPaint(SkPaint*) const; 80 void setupPaint(SkPaint*) const;
79 #endif 81 #endif
80 82
81 FontPlatformData& operator=(const FontPlatformData&); 83 FontPlatformData& operator=(const FontPlatformData&);
82 84
83 bool isHashTableDeletedValue() const { return m_isHashTableDeletedValue; } 85 bool isHashTableDeletedValue() const { return m_isHashTableDeletedValue; }
84 86
85 ~FontPlatformData(); 87 ~FontPlatformData();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 162
161 mutable SCRIPT_CACHE m_scriptCache; 163 mutable SCRIPT_CACHE m_scriptCache;
162 mutable OwnPtr<SCRIPT_FONTPROPERTIES> m_scriptFontProperties; 164 mutable OwnPtr<SCRIPT_FONTPROPERTIES> m_scriptFontProperties;
163 165
164 bool m_isHashTableDeletedValue; 166 bool m_isHashTableDeletedValue;
165 }; 167 };
166 168
167 } // WebCore 169 } // WebCore
168 170
169 #endif // FontPlatformDataChromiumWin_h 171 #endif // FontPlatformDataChromiumWin_h
OLDNEW
« no previous file with comments | « Source/core/platform/graphics/FontCache.h ('k') | Source/core/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698