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

Side by Side Diff: Source/platform/fonts/win/FontPlatformDataWin.h

Issue 99333013: Don't check lfQuality in LOGFONT as it has no effect on rendering (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // lfQuality 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 20 matching lines...) Expand all
88 88
89 bool isFixedPitch() const; 89 bool isFixedPitch() const;
90 float size() const { return m_textSize; } 90 float size() const { return m_textSize; }
91 #if USE(HARFBUZZ) 91 #if USE(HARFBUZZ)
92 HarfBuzzFace* harfBuzzFace() const; 92 HarfBuzzFace* harfBuzzFace() const;
93 #else 93 #else
94 HFONT hfont() const { return m_font ? m_font->hfont() : 0; } 94 HFONT hfont() const { return m_font ? m_font->hfont() : 0; }
95 #endif 95 #endif
96 SkTypeface* typeface() const { return m_typeface.get(); } 96 SkTypeface* typeface() const { return m_typeface.get(); }
97 SkFontID uniqueID() const { return m_typeface->uniqueID(); } 97 SkFontID uniqueID() const { return m_typeface->uniqueID(); }
98 int paintTextFlags() const { return m_paintTextFlags; } 98 int paintTextFlags() const;
99 99
100 String fontFamilyName() const; 100 String fontFamilyName() const;
101 101
102 FontOrientation orientation() const { return m_orientation; } 102 FontOrientation orientation() const { return m_orientation; }
103 void setOrientation(FontOrientation orientation) { m_orientation = orientati on; } 103 void setOrientation(FontOrientation orientation) { m_orientation = orientati on; }
104 104
105 #if ENABLE(GDI_FONTS_ON_WINDOWS) 105 #if ENABLE(GDI_FONTS_ON_WINDOWS)
106 unsigned hash() const 106 unsigned hash() const
107 { 107 {
108 return m_font ? m_font->hash() : NULL; 108 return m_font ? m_font->hash() : NULL;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 }; 164 };
165 165
166 RefPtr<RefCountedHFONT> m_font; 166 RefPtr<RefCountedHFONT> m_font;
167 #endif // !USE(HARFBUZZ) 167 #endif // !USE(HARFBUZZ)
168 float m_textSize; // Point size of the font in pixels. 168 float m_textSize; // Point size of the font in pixels.
169 FontOrientation m_orientation; 169 FontOrientation m_orientation;
170 bool m_fakeBold; 170 bool m_fakeBold;
171 bool m_fakeItalic; 171 bool m_fakeItalic;
172 172
173 RefPtr<SkTypeface> m_typeface; 173 RefPtr<SkTypeface> m_typeface;
174 int m_paintTextFlags;
175 174
176 #if USE(HARFBUZZ) 175 #if USE(HARFBUZZ)
177 mutable RefPtr<HarfBuzzFace> m_harfBuzzFace; 176 mutable RefPtr<HarfBuzzFace> m_harfBuzzFace;
178 #else 177 #else
179 mutable SCRIPT_CACHE m_scriptCache; 178 mutable SCRIPT_CACHE m_scriptCache;
180 mutable OwnPtr<SCRIPT_FONTPROPERTIES> m_scriptFontProperties; 179 mutable OwnPtr<SCRIPT_FONTPROPERTIES> m_scriptFontProperties;
181 #endif 180 #endif
182 181
183 bool m_isHashTableDeletedValue; 182 bool m_isHashTableDeletedValue;
184 bool m_useSubpixelPositioning; 183 bool m_useSubpixelPositioning;
185 }; 184 };
186 185
187 } // WebCore 186 } // WebCore
188 187
189 #endif // FontPlatformDataChromiumWin_h 188 #endif // FontPlatformDataChromiumWin_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698