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

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

Issue 186403002: Make font-related CSS properties less custom. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 bool usePrinterFont() const { return m_usePrinterFont; } 126 bool usePrinterFont() const { return m_usePrinterFont; }
127 #endif 127 #endif
128 // only use fixed default size when there is only one font family, and that family is "monospace" 128 // only use fixed default size when there is only one font family, and that family is "monospace"
129 bool useFixedDefaultSize() const { return genericFamily() == MonospaceFamily && !family().next() && family().family() == FontFamilyNames::webkit_monospace; } 129 bool useFixedDefaultSize() const { return genericFamily() == MonospaceFamily && !family().next() && family().family() == FontFamilyNames::webkit_monospace; }
130 Kerning kerning() const { return static_cast<Kerning>(m_kerning); } 130 Kerning kerning() const { return static_cast<Kerning>(m_kerning); }
131 LigaturesState commonLigaturesState() const { return static_cast<LigaturesSt ate>(m_commonLigaturesState); } 131 LigaturesState commonLigaturesState() const { return static_cast<LigaturesSt ate>(m_commonLigaturesState); }
132 LigaturesState discretionaryLigaturesState() const { return static_cast<Liga turesState>(m_discretionaryLigaturesState); } 132 LigaturesState discretionaryLigaturesState() const { return static_cast<Liga turesState>(m_discretionaryLigaturesState); }
133 LigaturesState historicalLigaturesState() const { return static_cast<Ligatur esState>(m_historicalLigaturesState); } 133 LigaturesState historicalLigaturesState() const { return static_cast<Ligatur esState>(m_historicalLigaturesState); }
134 unsigned keywordSize() const { return m_keywordSize; } 134 unsigned keywordSize() const { return m_keywordSize; }
135 FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMo de>(m_fontSmoothing); } 135 FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMo de>(m_fontSmoothing); }
136 TextRenderingMode textRenderingMode() const { return static_cast<TextRenderi ngMode>(m_textRendering); } 136 TextRenderingMode textRendering() const { return static_cast<TextRenderingMo de>(m_textRendering); }
137 UScriptCode script() const { return static_cast<UScriptCode>(m_script); } 137 UScriptCode script() const { return static_cast<UScriptCode>(m_script); }
138 bool isSyntheticBold() const { return m_syntheticBold; } 138 bool isSyntheticBold() const { return m_syntheticBold; }
139 bool isSyntheticItalic() const { return m_syntheticItalic; } 139 bool isSyntheticItalic() const { return m_syntheticItalic; }
140 bool useSubpixelPositioning() const { return m_subpixelTextPosition; } 140 bool useSubpixelPositioning() const { return m_subpixelTextPosition; }
141 141
142 FontTraitsMask traitsMask() const; 142 FontTraitsMask traitsMask() const;
143 float wordSpacing() const { return m_wordSpacing; } 143 float wordSpacing() const { return m_wordSpacing; }
144 float letterSpacing() const { return m_letterSpacing; } 144 float letterSpacing() const { return m_letterSpacing; }
145 bool isSpecifiedFont() const { return m_isSpecifiedFont; } 145 bool isSpecifiedFont() const { return m_isSpecifiedFont; }
146 FontOrientation orientation() const { return static_cast<FontOrientation>(m_ orientation); } 146 FontOrientation orientation() const { return static_cast<FontOrientation>(m_ orientation); }
(...skipping 15 matching lines...) Expand all
162 void setIsAbsoluteSize(bool s) { m_isAbsoluteSize = s; } 162 void setIsAbsoluteSize(bool s) { m_isAbsoluteSize = s; }
163 void setWeight(FontWeight w) { m_weight = w; } 163 void setWeight(FontWeight w) { m_weight = w; }
164 void setGenericFamily(GenericFamilyType genericFamily) { m_genericFamily = g enericFamily; } 164 void setGenericFamily(GenericFamilyType genericFamily) { m_genericFamily = g enericFamily; }
165 void setUsePrinterFont(bool p) { m_usePrinterFont = p; } 165 void setUsePrinterFont(bool p) { m_usePrinterFont = p; }
166 void setKerning(Kerning kerning) { m_kerning = kerning; updateTypesettingFea tures(); } 166 void setKerning(Kerning kerning) { m_kerning = kerning; updateTypesettingFea tures(); }
167 void setCommonLigaturesState(LigaturesState commonLigaturesState) { m_common LigaturesState = commonLigaturesState; updateTypesettingFeatures(); } 167 void setCommonLigaturesState(LigaturesState commonLigaturesState) { m_common LigaturesState = commonLigaturesState; updateTypesettingFeatures(); }
168 void setDiscretionaryLigaturesState(LigaturesState discretionaryLigaturesSta te) { m_discretionaryLigaturesState = discretionaryLigaturesState; } 168 void setDiscretionaryLigaturesState(LigaturesState discretionaryLigaturesSta te) { m_discretionaryLigaturesState = discretionaryLigaturesState; }
169 void setHistoricalLigaturesState(LigaturesState historicalLigaturesState) { m_historicalLigaturesState = historicalLigaturesState; } 169 void setHistoricalLigaturesState(LigaturesState historicalLigaturesState) { m_historicalLigaturesState = historicalLigaturesState; }
170 void setKeywordSize(unsigned s) { m_keywordSize = s; } 170 void setKeywordSize(unsigned s) { m_keywordSize = s; }
171 void setFontSmoothing(FontSmoothingMode smoothing) { m_fontSmoothing = smoot hing; } 171 void setFontSmoothing(FontSmoothingMode smoothing) { m_fontSmoothing = smoot hing; }
172 void setTextRenderingMode(TextRenderingMode rendering) { m_textRendering = r endering; updateTypesettingFeatures(); } 172 void setTextRendering(TextRenderingMode rendering) { m_textRendering = rende ring; updateTypesettingFeatures(); }
173 void setIsSpecifiedFont(bool isSpecifiedFont) { m_isSpecifiedFont = isSpecif iedFont; } 173 void setIsSpecifiedFont(bool isSpecifiedFont) { m_isSpecifiedFont = isSpecif iedFont; }
174 void setOrientation(FontOrientation orientation) { m_orientation = orientati on; } 174 void setOrientation(FontOrientation orientation) { m_orientation = orientati on; }
175 void setNonCJKGlyphOrientation(NonCJKGlyphOrientation orientation) { m_nonCJ KGlyphOrientation = orientation; } 175 void setNonCJKGlyphOrientation(NonCJKGlyphOrientation orientation) { m_nonCJ KGlyphOrientation = orientation; }
176 void setWidthVariant(FontWidthVariant widthVariant) { m_widthVariant = width Variant; } 176 void setWidthVariant(FontWidthVariant widthVariant) { m_widthVariant = width Variant; }
177 void setScript(UScriptCode s) { m_script = s; } 177 void setScript(UScriptCode s) { m_script = s; }
178 void setSyntheticBold(bool syntheticBold) { m_syntheticBold = syntheticBold; } 178 void setSyntheticBold(bool syntheticBold) { m_syntheticBold = syntheticBold; }
179 void setSyntheticItalic(bool syntheticItalic) { m_syntheticItalic = syntheti cItalic; } 179 void setSyntheticItalic(bool syntheticItalic) { m_syntheticItalic = syntheti cItalic; }
180 void setFeatureSettings(PassRefPtr<FontFeatureSettings> settings) { m_featur eSettings = settings; } 180 void setFeatureSettings(PassRefPtr<FontFeatureSettings> settings) { m_featur eSettings = settings; }
181 void setTraitsMask(FontTraitsMask); 181 void setTraitsMask(FontTraitsMask);
182 void setWordSpacing(float s) { m_wordSpacing = s; } 182 void setWordSpacing(float s) { m_wordSpacing = s; }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 && m_script == other.m_script 268 && m_script == other.m_script
269 && m_syntheticBold == other.m_syntheticBold 269 && m_syntheticBold == other.m_syntheticBold
270 && m_syntheticItalic == other.m_syntheticItalic 270 && m_syntheticItalic == other.m_syntheticItalic
271 && m_featureSettings == other.m_featureSettings 271 && m_featureSettings == other.m_featureSettings
272 && m_subpixelTextPosition == other.m_subpixelTextPosition; 272 && m_subpixelTextPosition == other.m_subpixelTextPosition;
273 } 273 }
274 274
275 } 275 }
276 276
277 #endif 277 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698