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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 float specifiedSize() const { return m_specifiedSize; } | 113 float specifiedSize() const { return m_specifiedSize; } |
114 float computedSize() const { return m_computedSize; } | 114 float computedSize() const { return m_computedSize; } |
115 FontItalic italic() const { return static_cast<FontItalic>(m_italic); } | 115 FontItalic italic() const { return static_cast<FontItalic>(m_italic); } |
116 int computedPixelSize() const { return int(m_computedSize + 0.5f); } | 116 int computedPixelSize() const { return int(m_computedSize + 0.5f); } |
117 FontSmallCaps smallCaps() const { return static_cast<FontSmallCaps>(m_smallC
aps); } | 117 FontSmallCaps smallCaps() const { return static_cast<FontSmallCaps>(m_smallC
aps); } |
118 bool isAbsoluteSize() const { return m_isAbsoluteSize; } | 118 bool isAbsoluteSize() const { return m_isAbsoluteSize; } |
119 FontWeight weight() const { return static_cast<FontWeight>(m_weight); } | 119 FontWeight weight() const { return static_cast<FontWeight>(m_weight); } |
120 FontWeight lighterWeight() const; | 120 FontWeight lighterWeight() const; |
121 FontWeight bolderWeight() const; | 121 FontWeight bolderWeight() const; |
122 GenericFamilyType genericFamily() const { return static_cast<GenericFamilyTy
pe>(m_genericFamily); } | 122 GenericFamilyType genericFamily() const { return static_cast<GenericFamilyTy
pe>(m_genericFamily); } |
| 123 #if OS(MACOSX) |
| 124 bool usePrinterFont() const { return false; } |
| 125 #else |
123 bool usePrinterFont() const { return m_usePrinterFont; } | 126 bool usePrinterFont() const { return m_usePrinterFont; } |
| 127 #endif |
124 // 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" |
125 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;
} |
126 Kerning kerning() const { return static_cast<Kerning>(m_kerning); } | 130 Kerning kerning() const { return static_cast<Kerning>(m_kerning); } |
127 LigaturesState commonLigaturesState() const { return static_cast<LigaturesSt
ate>(m_commonLigaturesState); } | 131 LigaturesState commonLigaturesState() const { return static_cast<LigaturesSt
ate>(m_commonLigaturesState); } |
128 LigaturesState discretionaryLigaturesState() const { return static_cast<Liga
turesState>(m_discretionaryLigaturesState); } | 132 LigaturesState discretionaryLigaturesState() const { return static_cast<Liga
turesState>(m_discretionaryLigaturesState); } |
129 LigaturesState historicalLigaturesState() const { return static_cast<Ligatur
esState>(m_historicalLigaturesState); } | 133 LigaturesState historicalLigaturesState() const { return static_cast<Ligatur
esState>(m_historicalLigaturesState); } |
130 unsigned keywordSize() const { return m_keywordSize; } | 134 unsigned keywordSize() const { return m_keywordSize; } |
131 FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMo
de>(m_fontSmoothing); } | 135 FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMo
de>(m_fontSmoothing); } |
132 TextRenderingMode textRenderingMode() const { return static_cast<TextRenderi
ngMode>(m_textRendering); } | 136 TextRenderingMode textRenderingMode() const { return static_cast<TextRenderi
ngMode>(m_textRendering); } |
133 UScriptCode script() const { return static_cast<UScriptCode>(m_script); } | 137 UScriptCode script() const { return static_cast<UScriptCode>(m_script); } |
(...skipping 17 matching lines...) Expand all Loading... |
151 void setFamily(const FontFamily& family) { m_familyList = family; } | 155 void setFamily(const FontFamily& family) { m_familyList = family; } |
152 void setComputedSize(float s) { m_computedSize = clampToFloat(s); } | 156 void setComputedSize(float s) { m_computedSize = clampToFloat(s); } |
153 void setSpecifiedSize(float s) { m_specifiedSize = clampToFloat(s); } | 157 void setSpecifiedSize(float s) { m_specifiedSize = clampToFloat(s); } |
154 void setItalic(FontItalic i) { m_italic = i; } | 158 void setItalic(FontItalic i) { m_italic = i; } |
155 void setItalic(bool i) { setItalic(i ? FontItalicOn : FontItalicOff); } | 159 void setItalic(bool i) { setItalic(i ? FontItalicOn : FontItalicOff); } |
156 void setSmallCaps(FontSmallCaps c) { m_smallCaps = c; } | 160 void setSmallCaps(FontSmallCaps c) { m_smallCaps = c; } |
157 void setSmallCaps(bool c) { setSmallCaps(c ? FontSmallCapsOn : FontSmallCaps
Off); } | 161 void setSmallCaps(bool c) { setSmallCaps(c ? FontSmallCapsOn : FontSmallCaps
Off); } |
158 void setIsAbsoluteSize(bool s) { m_isAbsoluteSize = s; } | 162 void setIsAbsoluteSize(bool s) { m_isAbsoluteSize = s; } |
159 void setWeight(FontWeight w) { m_weight = w; } | 163 void setWeight(FontWeight w) { m_weight = w; } |
160 void setGenericFamily(GenericFamilyType genericFamily) { m_genericFamily = g
enericFamily; } | 164 void setGenericFamily(GenericFamilyType genericFamily) { m_genericFamily = g
enericFamily; } |
161 #if OS(MACOSX) | |
162 void setUsePrinterFont(bool) { } | |
163 #else | |
164 void setUsePrinterFont(bool p) { m_usePrinterFont = p; } | 165 void setUsePrinterFont(bool p) { m_usePrinterFont = p; } |
165 #endif | |
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 setTextRenderingMode(TextRenderingMode rendering) { m_textRendering = r
endering; 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; } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |