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

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

Issue 715363005: Remove FontPlatformData::m_widthVariant. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. Created 6 years, 1 month 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, 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 class PLATFORM_EXPORT FontPlatformData { 69 class PLATFORM_EXPORT FontPlatformData {
70 public: 70 public:
71 // Used for deleted values in the font cache's hash tables. The hash table 71 // Used for deleted values in the font cache's hash tables. The hash table
72 // will create us with this structure, and it will compare other values 72 // will create us with this structure, and it will compare other values
73 // to this "Deleted" one. It expects the Deleted one to be differentiable 73 // to this "Deleted" one. It expects the Deleted one to be differentiable
74 // from the 0 one (created with the empty constructor), so we can't just 74 // from the 0 one (created with the empty constructor), so we can't just
75 // set everything to 0. 75 // set everything to 0.
76 FontPlatformData(WTF::HashTableDeletedValueType); 76 FontPlatformData(WTF::HashTableDeletedValueType);
77 FontPlatformData(); 77 FontPlatformData();
78 FontPlatformData(const FontPlatformData&); 78 FontPlatformData(const FontPlatformData&);
79 FontPlatformData(float size, bool syntheticBold, bool syntheticItalic, FontO rientation = Horizontal, FontWidthVariant = RegularWidth); 79 FontPlatformData(float size, bool syntheticBold, bool syntheticItalic, FontO rientation = Horizontal);
80 FontPlatformData(const FontPlatformData& src, float textSize); 80 FontPlatformData(const FontPlatformData& src, float textSize);
81 #if OS(MACOSX) 81 #if OS(MACOSX)
82 FontPlatformData(NSFont*, float size, bool syntheticBold = false, bool synth eticItalic = false, 82 FontPlatformData(NSFont*, float size, bool syntheticBold = false, bool synth eticItalic = false, FontOrientation = Horizontal);
83 FontOrientation = Horizontal, FontWidthVariant = RegularWid th); 83 FontPlatformData(CGFontRef, PassRefPtr<SkTypeface>, float size, bool synthet icBold, bool syntheticOblique, FontOrientation);
84 FontPlatformData(CGFontRef, PassRefPtr<SkTypeface>, float size, bool synthet icBold, bool syntheticOblique, FontOrientation, FontWidthVariant);
85 #else 84 #else
86 FontPlatformData(PassRefPtr<SkTypeface>, const char* name, float textSize, b ool syntheticBold, bool syntheticItalic, FontOrientation = Horizontal, bool subp ixelTextPosition = defaultUseSubpixelPositioning()); 85 FontPlatformData(PassRefPtr<SkTypeface>, const char* name, float textSize, b ool syntheticBold, bool syntheticItalic, FontOrientation = Horizontal, bool subp ixelTextPosition = defaultUseSubpixelPositioning());
87 #endif 86 #endif
88 ~FontPlatformData(); 87 ~FontPlatformData();
89 88
90 #if OS(MACOSX) 89 #if OS(MACOSX)
91 NSFont* font() const { return m_font; } 90 NSFont* font() const { return m_font; }
92 void setFont(NSFont*); 91 void setFont(NSFont*);
93 92
94 CGFontRef cgFont() const { return m_cgFont.get(); } 93 CGFontRef cgFont() const { return m_cgFont.get(); }
95 CTFontRef ctFont() const; 94 CTFontRef ctFont() const;
96 95
97 bool roundsGlyphAdvances() const; 96 bool roundsGlyphAdvances() const;
98 bool allowsLigatures() const; 97 bool allowsLigatures() const;
99 98
100 bool isColorBitmapFont() const { return m_isColorBitmapFont; } 99 bool isColorBitmapFont() const { return m_isColorBitmapFont; }
101 bool isCompositeFontReference() const { return m_isCompositeFontReference; } 100 bool isCompositeFontReference() const { return m_isCompositeFontReference; }
102
103 FontWidthVariant widthVariant() const { return m_widthVariant; }
104 #endif 101 #endif
105 102
106 String fontFamilyName() const; 103 String fontFamilyName() const;
107 float size() const { return m_textSize; } 104 float size() const { return m_textSize; }
108 bool isFixedPitch() const; 105 bool isFixedPitch() const;
109 bool syntheticBold() const { return m_syntheticBold; } 106 bool syntheticBold() const { return m_syntheticBold; }
110 bool syntheticItalic() const { return m_syntheticItalic; } 107 bool syntheticItalic() const { return m_syntheticItalic; }
111 108
112 SkTypeface* typeface() const; 109 SkTypeface* typeface() const;
113 HarfBuzzFace* harfBuzzFace() const; 110 HarfBuzzFace* harfBuzzFace() const;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 177
181 public: 178 public:
182 float m_textSize; 179 float m_textSize;
183 bool m_syntheticBold; 180 bool m_syntheticBold;
184 bool m_syntheticItalic; 181 bool m_syntheticItalic;
185 FontOrientation m_orientation; 182 FontOrientation m_orientation;
186 #if OS(MACOSX) 183 #if OS(MACOSX)
187 bool m_isColorBitmapFont; 184 bool m_isColorBitmapFont;
188 bool m_isCompositeFontReference; 185 bool m_isCompositeFontReference;
189 #endif 186 #endif
190 FontWidthVariant m_widthVariant;
191 private: 187 private:
192 #if OS(MACOSX) 188 #if OS(MACOSX)
193 NSFont* m_font; 189 NSFont* m_font;
194 RetainPtr<CGFontRef> m_cgFont; 190 RetainPtr<CGFontRef> m_cgFont;
195 mutable RetainPtr<CTFontRef> m_CTFont; 191 mutable RetainPtr<CTFontRef> m_CTFont;
196 RefPtr<MemoryActivatedFont> m_inMemoryFont; 192 RefPtr<MemoryActivatedFont> m_inMemoryFont;
197 #else 193 #else
198 FontRenderStyle m_style; 194 FontRenderStyle m_style;
199 #endif 195 #endif
200 196
201 mutable RefPtr<HarfBuzzFace> m_harfBuzzFace; 197 mutable RefPtr<HarfBuzzFace> m_harfBuzzFace;
202 bool m_isHashTableDeletedValue; 198 bool m_isHashTableDeletedValue;
203 #if OS(WIN) 199 #if OS(WIN)
204 int m_paintTextFlags; 200 int m_paintTextFlags;
205 bool m_useSubpixelPositioning; 201 bool m_useSubpixelPositioning;
206 unsigned m_minSizeForAntiAlias; 202 unsigned m_minSizeForAntiAlias;
207 float m_minSizeForSubpixel; 203 float m_minSizeForSubpixel;
208 #endif 204 #endif
209 }; 205 };
210 206
211 } // namespace blink 207 } // namespace blink
212 208
213 #endif // ifdef FontPlatformData_h 209 #endif // ifdef FontPlatformData_h
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontCustomPlatformData.h ('k') | Source/platform/fonts/FontPlatformData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698