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

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

Issue 1746283002: Rename enums/functions that collide in chromium style in platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get-names-13-platform: . Created 4 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 FamilyDescription(GenericFamilyType genericFamily, const FontFamily& fam ily) 128 FamilyDescription(GenericFamilyType genericFamily, const FontFamily& fam ily)
129 : genericFamily(genericFamily) 129 : genericFamily(genericFamily)
130 , family(family) 130 , family(family)
131 { 131 {
132 } 132 }
133 GenericFamilyType genericFamily; 133 GenericFamilyType genericFamily;
134 FontFamily family; 134 FontFamily family;
135 }; 135 };
136 136
137 const FontFamily& family() const { return m_familyList; } 137 const FontFamily& family() const { return m_familyList; }
138 FamilyDescription familyDescription() const { return FamilyDescription(gener icFamily(), family()); } 138 FamilyDescription getFamilyDescription() const { return FamilyDescription(ge nericFamily(), family()); }
139 FontFamily& firstFamily() { return m_familyList; } 139 FontFamily& firstFamily() { return m_familyList; }
140 Size size() const { return Size(keywordSize(), specifiedSize(), isAbsoluteSi ze()); } 140 Size getSize() const { return Size(keywordSize(), specifiedSize(), isAbsolut eSize()); }
141 float specifiedSize() const { return m_specifiedSize; } 141 float specifiedSize() const { return m_specifiedSize; }
142 float computedSize() const { return m_computedSize; } 142 float computedSize() const { return m_computedSize; }
143 float adjustedSize() const { return m_adjustedSize; } 143 float adjustedSize() const { return m_adjustedSize; }
144 float sizeAdjust() const { return m_sizeAdjust; } 144 float sizeAdjust() const { return m_sizeAdjust; }
145 bool hasSizeAdjust() const { return m_sizeAdjust != FontSizeAdjustNone; } 145 bool hasSizeAdjust() const { return m_sizeAdjust != FontSizeAdjustNone; }
146 FontStyle style() const { return static_cast<FontStyle>(m_fields.m_style); } 146 FontStyle style() const { return static_cast<FontStyle>(m_fields.m_style); }
147 int computedPixelSize() const { return int(m_computedSize + 0.5f); } 147 int computedPixelSize() const { return int(m_computedSize + 0.5f); }
148 FontVariant variant() const { return static_cast<FontVariant>(m_fields.m_var iant); } 148 FontVariant variant() const { return static_cast<FontVariant>(m_fields.m_var iant); }
149 bool isAbsoluteSize() const { return m_fields.m_isAbsoluteSize; } 149 bool isAbsoluteSize() const { return m_fields.m_isAbsoluteSize; }
150 FontWeight weight() const { return static_cast<FontWeight>(m_fields.m_weight ); } 150 FontWeight weight() const { return static_cast<FontWeight>(m_fields.m_weight ); }
151 FontStretch stretch() const { return static_cast<FontStretch>(m_fields.m_str etch); } 151 FontStretch stretch() const { return static_cast<FontStretch>(m_fields.m_str etch); }
152 static FontWeight lighterWeight(FontWeight); 152 static FontWeight lighterWeight(FontWeight);
153 static FontWeight bolderWeight(FontWeight); 153 static FontWeight bolderWeight(FontWeight);
154 static Size largerSize(const Size&); 154 static Size largerSize(const Size&);
155 static Size smallerSize(const Size&); 155 static Size smallerSize(const Size&);
156 GenericFamilyType genericFamily() const { return static_cast<GenericFamilyTy pe>(m_fields.m_genericFamily); } 156 GenericFamilyType genericFamily() const { return static_cast<GenericFamilyTy pe>(m_fields.m_genericFamily); }
157 157
158 // only use fixed default size when there is only one font family, and that family is "monospace" 158 // only use fixed default size when there is only one font family, and that family is "monospace"
159 bool isMonospace() const 159 bool isMonospace() const
160 { 160 {
161 return genericFamily() == MonospaceFamily && !family().next() && family( ).family() == FontFamilyNames::webkit_monospace; 161 return genericFamily() == MonospaceFamily && !family().next() && family( ).family() == FontFamilyNames::webkit_monospace;
162 } 162 }
163 Kerning kerning() const { return static_cast<Kerning>(m_fields.m_kerning); } 163 Kerning getKerning() const { return static_cast<Kerning>(m_fields.m_kerning) ; }
164 VariantLigatures variantLigatures() const; 164 VariantLigatures variantLigatures() const;
165 LigaturesState commonLigaturesState() const { return static_cast<LigaturesSt ate>(m_fields.m_commonLigaturesState); } 165 LigaturesState commonLigaturesState() const { return static_cast<LigaturesSt ate>(m_fields.m_commonLigaturesState); }
166 LigaturesState discretionaryLigaturesState() const { return static_cast<Liga turesState>(m_fields.m_discretionaryLigaturesState); } 166 LigaturesState discretionaryLigaturesState() const { return static_cast<Liga turesState>(m_fields.m_discretionaryLigaturesState); }
167 LigaturesState historicalLigaturesState() const { return static_cast<Ligatur esState>(m_fields.m_historicalLigaturesState); } 167 LigaturesState historicalLigaturesState() const { return static_cast<Ligatur esState>(m_fields.m_historicalLigaturesState); }
168 LigaturesState contextualLigaturesState() const { return static_cast<Ligatur esState>(m_fields.m_contextualLigaturesState); } 168 LigaturesState contextualLigaturesState() const { return static_cast<Ligatur esState>(m_fields.m_contextualLigaturesState); }
169 unsigned keywordSize() const { return m_fields.m_keywordSize; } 169 unsigned keywordSize() const { return m_fields.m_keywordSize; }
170 FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMo de>(m_fields.m_fontSmoothing); } 170 FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMo de>(m_fields.m_fontSmoothing); }
171 TextRenderingMode textRendering() const { return static_cast<TextRenderingMo de>(m_fields.m_textRendering); } 171 TextRenderingMode textRendering() const { return static_cast<TextRenderingMo de>(m_fields.m_textRendering); }
172 UScriptCode script() const { return static_cast<UScriptCode>(m_fields.m_scri pt); } 172 UScriptCode script() const { return static_cast<UScriptCode>(m_fields.m_scri pt); }
173 const AtomicString& locale(bool includeDefault = true) const; 173 const AtomicString& locale(bool includeDefault = true) const;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 m_locale = locale; 212 m_locale = locale;
213 m_fields.m_script = localeToScriptCodeForFontSelection(locale); 213 m_fields.m_script = localeToScriptCodeForFontSelection(locale);
214 } 214 }
215 void setSyntheticBold(bool syntheticBold) { m_fields.m_syntheticBold = synth eticBold; } 215 void setSyntheticBold(bool syntheticBold) { m_fields.m_syntheticBold = synth eticBold; }
216 void setSyntheticItalic(bool syntheticItalic) { m_fields.m_syntheticItalic = syntheticItalic; } 216 void setSyntheticItalic(bool syntheticItalic) { m_fields.m_syntheticItalic = syntheticItalic; }
217 void setFeatureSettings(PassRefPtr<FontFeatureSettings> settings) { m_featur eSettings = settings; } 217 void setFeatureSettings(PassRefPtr<FontFeatureSettings> settings) { m_featur eSettings = settings; }
218 void setTraits(FontTraits); 218 void setTraits(FontTraits);
219 void setWordSpacing(float s) { m_wordSpacing = s; } 219 void setWordSpacing(float s) { m_wordSpacing = s; }
220 void setLetterSpacing(float s) { m_letterSpacing = s; updateTypesettingFeatu res(); } 220 void setLetterSpacing(float s) { m_letterSpacing = s; updateTypesettingFeatu res(); }
221 221
222 TypesettingFeatures typesettingFeatures() const { return static_cast<Typeset tingFeatures>(m_fields.m_typesettingFeatures); } 222 TypesettingFeatures getTypesettingFeatures() const { return static_cast<Type settingFeatures>(m_fields.m_typesettingFeatures); }
223 223
224 static void setSubpixelPositioning(bool b) { s_useSubpixelTextPositioning = b; } 224 static void setSubpixelPositioning(bool b) { s_useSubpixelTextPositioning = b; }
225 static bool subpixelPositioning() { return s_useSubpixelTextPositioning; } 225 static bool subpixelPositioning() { return s_useSubpixelTextPositioning; }
226 226
227 static void setDefaultTypesettingFeatures(TypesettingFeatures); 227 static void setDefaultTypesettingFeatures(TypesettingFeatures);
228 static TypesettingFeatures defaultTypesettingFeatures(); 228 static TypesettingFeatures defaultTypesettingFeatures();
229 229
230 unsigned styleHashWithoutFamilyList() const; 230 unsigned styleHashWithoutFamilyList() const;
231 unsigned bitmapFields() const { return m_fieldsAsUnsigned[0]; } 231 unsigned bitmapFields() const { return m_fieldsAsUnsigned[0]; }
232 unsigned auxiliaryBitmapFields() const { return m_fieldsAsUnsigned[1]; } 232 unsigned auxiliaryBitmapFields() const { return m_fieldsAsUnsigned[1]; }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 && m_letterSpacing == other.m_letterSpacing 307 && m_letterSpacing == other.m_letterSpacing
308 && m_wordSpacing == other.m_wordSpacing 308 && m_wordSpacing == other.m_wordSpacing
309 && m_fieldsAsUnsigned[0] == other.m_fieldsAsUnsigned[0] 309 && m_fieldsAsUnsigned[0] == other.m_fieldsAsUnsigned[0]
310 && m_fieldsAsUnsigned[1] == other.m_fieldsAsUnsigned[1] 310 && m_fieldsAsUnsigned[1] == other.m_fieldsAsUnsigned[1]
311 && m_featureSettings == other.m_featureSettings; 311 && m_featureSettings == other.m_featureSettings;
312 } 312 }
313 313
314 } // namespace blink 314 } // namespace blink
315 315
316 #endif 316 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/Font.cpp ('k') | third_party/WebKit/Source/platform/fonts/FontDescription.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698