OLD | NEW |
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 float specifiedSize() const { return m_specifiedSize; } | 109 float specifiedSize() const { return m_specifiedSize; } |
110 float computedSize() const { return m_computedSize; } | 110 float computedSize() const { return m_computedSize; } |
111 FontItalic italic() const { return static_cast<FontItalic>(m_italic); } | 111 FontItalic italic() const { return static_cast<FontItalic>(m_italic); } |
112 int computedPixelSize() const { return int(m_computedSize + 0.5f); } | 112 int computedPixelSize() const { return int(m_computedSize + 0.5f); } |
113 FontSmallCaps smallCaps() const { return static_cast<FontSmallCaps>(m_smallC
aps); } | 113 FontSmallCaps smallCaps() const { return static_cast<FontSmallCaps>(m_smallC
aps); } |
114 bool isAbsoluteSize() const { return m_isAbsoluteSize; } | 114 bool isAbsoluteSize() const { return m_isAbsoluteSize; } |
115 FontWeight weight() const { return static_cast<FontWeight>(m_weight); } | 115 FontWeight weight() const { return static_cast<FontWeight>(m_weight); } |
116 FontWeight lighterWeight() const; | 116 FontWeight lighterWeight() const; |
117 FontWeight bolderWeight() const; | 117 FontWeight bolderWeight() const; |
118 GenericFamilyType genericFamily() const { return static_cast<GenericFamilyTy
pe>(m_genericFamily); } | 118 GenericFamilyType genericFamily() const { return static_cast<GenericFamilyTy
pe>(m_genericFamily); } |
119 #if OS(MACOSX) | |
120 bool usePrinterFont() const { return false; } | |
121 #else | |
122 bool usePrinterFont() const { return m_usePrinterFont; } | 119 bool usePrinterFont() const { return m_usePrinterFont; } |
123 #endif | |
124 // only use fixed default size when there is only one font family, and that
family is "monospace" | 120 // only use fixed default size when there is only one font family, and that
family is "monospace" |
125 bool useFixedDefaultSize() const { return genericFamily() == MonospaceFamily
&& !family().next() && family().family() == FontFamilyNames::webkit_monospace;
} | 121 bool useFixedDefaultSize() const { return genericFamily() == MonospaceFamily
&& !family().next() && family().family() == FontFamilyNames::webkit_monospace;
} |
126 Kerning kerning() const { return static_cast<Kerning>(m_kerning); } | 122 Kerning kerning() const { return static_cast<Kerning>(m_kerning); } |
127 LigaturesState commonLigaturesState() const { return static_cast<LigaturesSt
ate>(m_commonLigaturesState); } | 123 LigaturesState commonLigaturesState() const { return static_cast<LigaturesSt
ate>(m_commonLigaturesState); } |
128 LigaturesState discretionaryLigaturesState() const { return static_cast<Liga
turesState>(m_discretionaryLigaturesState); } | 124 LigaturesState discretionaryLigaturesState() const { return static_cast<Liga
turesState>(m_discretionaryLigaturesState); } |
129 LigaturesState historicalLigaturesState() const { return static_cast<Ligatur
esState>(m_historicalLigaturesState); } | 125 LigaturesState historicalLigaturesState() const { return static_cast<Ligatur
esState>(m_historicalLigaturesState); } |
130 unsigned keywordSize() const { return m_keywordSize; } | 126 unsigned keywordSize() const { return m_keywordSize; } |
131 FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMo
de>(m_fontSmoothing); } | 127 FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMo
de>(m_fontSmoothing); } |
132 TextRenderingMode textRenderingMode() const { return static_cast<TextRenderi
ngMode>(m_textRendering); } | 128 TextRenderingMode textRenderingMode() const { return static_cast<TextRenderi
ngMode>(m_textRendering); } |
133 UScriptCode script() const { return static_cast<UScriptCode>(m_script); } | 129 UScriptCode script() const { return static_cast<UScriptCode>(m_script); } |
(...skipping 15 matching lines...) Expand all Loading... |
149 void setFamily(const FontFamily& family) { m_familyList = family; } | 145 void setFamily(const FontFamily& family) { m_familyList = family; } |
150 void setComputedSize(float s) { m_computedSize = clampToFloat(s); } | 146 void setComputedSize(float s) { m_computedSize = clampToFloat(s); } |
151 void setSpecifiedSize(float s) { m_specifiedSize = clampToFloat(s); } | 147 void setSpecifiedSize(float s) { m_specifiedSize = clampToFloat(s); } |
152 void setItalic(FontItalic i) { m_italic = i; } | 148 void setItalic(FontItalic i) { m_italic = i; } |
153 void setItalic(bool i) { setItalic(i ? FontItalicOn : FontItalicOff); } | 149 void setItalic(bool i) { setItalic(i ? FontItalicOn : FontItalicOff); } |
154 void setSmallCaps(FontSmallCaps c) { m_smallCaps = c; } | 150 void setSmallCaps(FontSmallCaps c) { m_smallCaps = c; } |
155 void setSmallCaps(bool c) { setSmallCaps(c ? FontSmallCapsOn : FontSmallCaps
Off); } | 151 void setSmallCaps(bool c) { setSmallCaps(c ? FontSmallCapsOn : FontSmallCaps
Off); } |
156 void setIsAbsoluteSize(bool s) { m_isAbsoluteSize = s; } | 152 void setIsAbsoluteSize(bool s) { m_isAbsoluteSize = s; } |
157 void setWeight(FontWeight w) { m_weight = w; } | 153 void setWeight(FontWeight w) { m_weight = w; } |
158 void setGenericFamily(GenericFamilyType genericFamily) { m_genericFamily = g
enericFamily; } | 154 void setGenericFamily(GenericFamilyType genericFamily) { m_genericFamily = g
enericFamily; } |
| 155 #if OS(MACOSX) |
| 156 void setUsePrinterFont(bool) { } |
| 157 #else |
159 void setUsePrinterFont(bool p) { m_usePrinterFont = p; } | 158 void setUsePrinterFont(bool p) { m_usePrinterFont = p; } |
| 159 #endif |
160 void setKerning(Kerning kerning) { m_kerning = kerning; } | 160 void setKerning(Kerning kerning) { m_kerning = kerning; } |
161 void setCommonLigaturesState(LigaturesState commonLigaturesState) { m_common
LigaturesState = commonLigaturesState; } | 161 void setCommonLigaturesState(LigaturesState commonLigaturesState) { m_common
LigaturesState = commonLigaturesState; } |
162 void setDiscretionaryLigaturesState(LigaturesState discretionaryLigaturesSta
te) { m_discretionaryLigaturesState = discretionaryLigaturesState; } | 162 void setDiscretionaryLigaturesState(LigaturesState discretionaryLigaturesSta
te) { m_discretionaryLigaturesState = discretionaryLigaturesState; } |
163 void setHistoricalLigaturesState(LigaturesState historicalLigaturesState) {
m_historicalLigaturesState = historicalLigaturesState; } | 163 void setHistoricalLigaturesState(LigaturesState historicalLigaturesState) {
m_historicalLigaturesState = historicalLigaturesState; } |
164 void setKeywordSize(unsigned s) { m_keywordSize = s; } | 164 void setKeywordSize(unsigned s) { m_keywordSize = s; } |
165 void setFontSmoothing(FontSmoothingMode smoothing) { m_fontSmoothing = smoot
hing; } | 165 void setFontSmoothing(FontSmoothingMode smoothing) { m_fontSmoothing = smoot
hing; } |
166 void setTextRenderingMode(TextRenderingMode rendering) { m_textRendering = r
endering; } | 166 void setTextRenderingMode(TextRenderingMode rendering) { m_textRendering = r
endering; } |
167 void setIsSpecifiedFont(bool isSpecifiedFont) { m_isSpecifiedFont = isSpecif
iedFont; } | 167 void setIsSpecifiedFont(bool isSpecifiedFont) { m_isSpecifiedFont = isSpecif
iedFont; } |
168 void setOrientation(FontOrientation orientation) { m_orientation = orientati
on; } | 168 void setOrientation(FontOrientation orientation) { m_orientation = orientati
on; } |
169 void setNonCJKGlyphOrientation(NonCJKGlyphOrientation orientation) { m_nonCJ
KGlyphOrientation = orientation; } | 169 void setNonCJKGlyphOrientation(NonCJKGlyphOrientation orientation) { m_nonCJ
KGlyphOrientation = orientation; } |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 && m_script == other.m_script | 244 && m_script == other.m_script |
245 && m_syntheticBold == other.m_syntheticBold | 245 && m_syntheticBold == other.m_syntheticBold |
246 && m_syntheticItalic == other.m_syntheticItalic | 246 && m_syntheticItalic == other.m_syntheticItalic |
247 && m_featureSettings == other.m_featureSettings | 247 && m_featureSettings == other.m_featureSettings |
248 && m_subpixelTextPosition == other.m_subpixelTextPosition; | 248 && m_subpixelTextPosition == other.m_subpixelTextPosition; |
249 } | 249 } |
250 | 250 |
251 } | 251 } |
252 | 252 |
253 #endif | 253 #endif |
OLD | NEW |