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