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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontPlatformData.h

Issue 2737533002: Replace subpixel font size heuristics with using OpenType gasp table (Closed)
Patch Set: No subpixel without smoothing, not even for layout tests Created 3 years, 9 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, 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 m_orientation = orientation; 133 m_orientation = orientation;
134 } 134 }
135 void setSyntheticBold(bool syntheticBold) { m_syntheticBold = syntheticBold; } 135 void setSyntheticBold(bool syntheticBold) { m_syntheticBold = syntheticBold; }
136 void setSyntheticItalic(bool syntheticItalic) { 136 void setSyntheticItalic(bool syntheticItalic) {
137 m_syntheticItalic = syntheticItalic; 137 m_syntheticItalic = syntheticItalic;
138 } 138 }
139 bool operator==(const FontPlatformData&) const; 139 bool operator==(const FontPlatformData&) const;
140 const FontPlatformData& operator=(const FontPlatformData&); 140 const FontPlatformData& operator=(const FontPlatformData&);
141 141
142 bool isHashTableDeletedValue() const { return m_isHashTableDeletedValue; } 142 bool isHashTableDeletedValue() const { return m_isHashTableDeletedValue; }
143 #if OS(WIN)
144 void setMinSizeForAntiAlias(unsigned size) { m_minSizeForAntiAlias = size; }
145 unsigned minSizeForAntiAlias() const { return m_minSizeForAntiAlias; }
146 void setMinSizeForSubpixel(float size) { m_minSizeForSubpixel = size; }
147 float minSizeForSubpixel() const { return m_minSizeForSubpixel; }
148 #endif
149 bool fontContainsCharacter(UChar32 character); 143 bool fontContainsCharacter(UChar32 character);
150 144
151 PassRefPtr<OpenTypeVerticalData> verticalData() const; 145 PassRefPtr<OpenTypeVerticalData> verticalData() const;
152 PassRefPtr<SharedBuffer> openTypeTable(SkFontTableTag) const; 146 PassRefPtr<SharedBuffer> openTypeTable(SkFontTableTag) const;
153 147
154 #if OS(LINUX) || OS(ANDROID) 148 #if OS(LINUX) || OS(ANDROID)
155 // The returned styles are all actual styles without 149 // The returned styles are all actual styles without
156 // FontRenderStyle::NoPreference. 150 // FontRenderStyle::NoPreference.
157 const FontRenderStyle& getFontRenderStyle() const { return m_style; } 151 const FontRenderStyle& getFontRenderStyle() const { return m_style; }
158 #endif 152 #endif
(...skipping 21 matching lines...) Expand all
180 174
181 private: 175 private:
182 #if OS(LINUX) || OS(ANDROID) 176 #if OS(LINUX) || OS(ANDROID)
183 FontRenderStyle m_style; 177 FontRenderStyle m_style;
184 #endif 178 #endif
185 179
186 mutable RefPtr<HarfBuzzFace> m_harfBuzzFace; 180 mutable RefPtr<HarfBuzzFace> m_harfBuzzFace;
187 bool m_isHashTableDeletedValue; 181 bool m_isHashTableDeletedValue;
188 #if OS(WIN) 182 #if OS(WIN)
189 int m_paintTextFlags; 183 int m_paintTextFlags;
190 unsigned m_minSizeForAntiAlias;
191 float m_minSizeForSubpixel;
192 #endif 184 #endif
193 }; 185 };
194 186
195 } // namespace blink 187 } // namespace blink
196 188
197 #endif // ifdef FontPlatformData_h 189 #endif // ifdef FontPlatformData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698