| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 , m_wordSpacing(0) | 60 , m_wordSpacing(0) |
| 61 , m_orientation(Horizontal) | 61 , m_orientation(Horizontal) |
| 62 , m_nonCJKGlyphOrientation(NonCJKGlyphOrientationVerticalRight) | 62 , m_nonCJKGlyphOrientation(NonCJKGlyphOrientationVerticalRight) |
| 63 , m_widthVariant(RegularWidth) | 63 , m_widthVariant(RegularWidth) |
| 64 , m_style(FontStyleNormal) | 64 , m_style(FontStyleNormal) |
| 65 , m_variant(FontVariantNormal) | 65 , m_variant(FontVariantNormal) |
| 66 , m_isAbsoluteSize(false) | 66 , m_isAbsoluteSize(false) |
| 67 , m_weight(FontWeightNormal) | 67 , m_weight(FontWeightNormal) |
| 68 , m_stretch(FontStretchNormal) | 68 , m_stretch(FontStretchNormal) |
| 69 , m_genericFamily(NoFamily) | 69 , m_genericFamily(NoFamily) |
| 70 , m_usePrinterFont(false) | |
| 71 , m_kerning(AutoKerning) | 70 , m_kerning(AutoKerning) |
| 72 , m_commonLigaturesState(NormalLigaturesState) | 71 , m_commonLigaturesState(NormalLigaturesState) |
| 73 , m_discretionaryLigaturesState(NormalLigaturesState) | 72 , m_discretionaryLigaturesState(NormalLigaturesState) |
| 74 , m_historicalLigaturesState(NormalLigaturesState) | 73 , m_historicalLigaturesState(NormalLigaturesState) |
| 75 , m_contextualLigaturesState(NormalLigaturesState) | 74 , m_contextualLigaturesState(NormalLigaturesState) |
| 76 , m_keywordSize(0) | 75 , m_keywordSize(0) |
| 77 , m_fontSmoothing(AutoSmoothing) | 76 , m_fontSmoothing(AutoSmoothing) |
| 78 , m_textRendering(AutoTextRendering) | 77 , m_textRendering(AutoTextRendering) |
| 79 , m_script(USCRIPT_COMMON) | 78 , m_script(USCRIPT_COMMON) |
| 80 , m_syntheticBold(false) | 79 , m_syntheticBold(false) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 93 float computedSize() const { return m_computedSize; } | 92 float computedSize() const { return m_computedSize; } |
| 94 FontStyle style() const { return static_cast<FontStyle>(m_style); } | 93 FontStyle style() const { return static_cast<FontStyle>(m_style); } |
| 95 int computedPixelSize() const { return int(m_computedSize + 0.5f); } | 94 int computedPixelSize() const { return int(m_computedSize + 0.5f); } |
| 96 FontVariant variant() const { return static_cast<FontVariant>(m_variant); } | 95 FontVariant variant() const { return static_cast<FontVariant>(m_variant); } |
| 97 bool isAbsoluteSize() const { return m_isAbsoluteSize; } | 96 bool isAbsoluteSize() const { return m_isAbsoluteSize; } |
| 98 FontWeight weight() const { return static_cast<FontWeight>(m_weight); } | 97 FontWeight weight() const { return static_cast<FontWeight>(m_weight); } |
| 99 FontStretch stretch() const { return static_cast<FontStretch>(m_stretch); } | 98 FontStretch stretch() const { return static_cast<FontStretch>(m_stretch); } |
| 100 FontWeight lighterWeight() const; | 99 FontWeight lighterWeight() const; |
| 101 FontWeight bolderWeight() const; | 100 FontWeight bolderWeight() const; |
| 102 GenericFamilyType genericFamily() const { return static_cast<GenericFamilyTy
pe>(m_genericFamily); } | 101 GenericFamilyType genericFamily() const { return static_cast<GenericFamilyTy
pe>(m_genericFamily); } |
| 103 #if OS(MACOSX) | 102 |
| 104 bool usePrinterFont() const { return false; } | |
| 105 #else | |
| 106 bool usePrinterFont() const { return m_usePrinterFont; } | |
| 107 #endif | |
| 108 // only use fixed default size when there is only one font family, and that
family is "monospace" | 103 // only use fixed default size when there is only one font family, and that
family is "monospace" |
| 109 bool useFixedDefaultSize() const { return genericFamily() == MonospaceFamily
&& !family().next() && family().family() == FontFamilyNames::webkit_monospace;
} | 104 bool useFixedDefaultSize() const { return genericFamily() == MonospaceFamily
&& !family().next() && family().family() == FontFamilyNames::webkit_monospace;
} |
| 110 Kerning kerning() const { return static_cast<Kerning>(m_kerning); } | 105 Kerning kerning() const { return static_cast<Kerning>(m_kerning); } |
| 111 LigaturesState commonLigaturesState() const { return static_cast<LigaturesSt
ate>(m_commonLigaturesState); } | 106 LigaturesState commonLigaturesState() const { return static_cast<LigaturesSt
ate>(m_commonLigaturesState); } |
| 112 LigaturesState discretionaryLigaturesState() const { return static_cast<Liga
turesState>(m_discretionaryLigaturesState); } | 107 LigaturesState discretionaryLigaturesState() const { return static_cast<Liga
turesState>(m_discretionaryLigaturesState); } |
| 113 LigaturesState historicalLigaturesState() const { return static_cast<Ligatur
esState>(m_historicalLigaturesState); } | 108 LigaturesState historicalLigaturesState() const { return static_cast<Ligatur
esState>(m_historicalLigaturesState); } |
| 114 LigaturesState contextualLigaturesState() const { return static_cast<Ligatur
esState>(m_contextualLigaturesState); } | 109 LigaturesState contextualLigaturesState() const { return static_cast<Ligatur
esState>(m_contextualLigaturesState); } |
| 115 unsigned keywordSize() const { return m_keywordSize; } | 110 unsigned keywordSize() const { return m_keywordSize; } |
| 116 FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMo
de>(m_fontSmoothing); } | 111 FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMo
de>(m_fontSmoothing); } |
| 117 TextRenderingMode textRendering() const { return static_cast<TextRenderingMo
de>(m_textRendering); } | 112 TextRenderingMode textRendering() const { return static_cast<TextRenderingMo
de>(m_textRendering); } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 134 | 129 |
| 135 void setFamily(const FontFamily& family) { m_familyList = family; } | 130 void setFamily(const FontFamily& family) { m_familyList = family; } |
| 136 void setComputedSize(float s) { m_computedSize = clampToFloat(s); } | 131 void setComputedSize(float s) { m_computedSize = clampToFloat(s); } |
| 137 void setSpecifiedSize(float s) { m_specifiedSize = clampToFloat(s); } | 132 void setSpecifiedSize(float s) { m_specifiedSize = clampToFloat(s); } |
| 138 void setStyle(FontStyle i) { m_style = i; } | 133 void setStyle(FontStyle i) { m_style = i; } |
| 139 void setVariant(FontVariant c) { m_variant = c; } | 134 void setVariant(FontVariant c) { m_variant = c; } |
| 140 void setIsAbsoluteSize(bool s) { m_isAbsoluteSize = s; } | 135 void setIsAbsoluteSize(bool s) { m_isAbsoluteSize = s; } |
| 141 void setWeight(FontWeight w) { m_weight = w; } | 136 void setWeight(FontWeight w) { m_weight = w; } |
| 142 void setStretch(FontStretch s) { m_stretch = s; } | 137 void setStretch(FontStretch s) { m_stretch = s; } |
| 143 void setGenericFamily(GenericFamilyType genericFamily) { m_genericFamily = g
enericFamily; } | 138 void setGenericFamily(GenericFamilyType genericFamily) { m_genericFamily = g
enericFamily; } |
| 144 void setUsePrinterFont(bool p) { m_usePrinterFont = p; } | |
| 145 void setKerning(Kerning kerning) { m_kerning = kerning; updateTypesettingFea
tures(); } | 139 void setKerning(Kerning kerning) { m_kerning = kerning; updateTypesettingFea
tures(); } |
| 146 void setCommonLigaturesState(LigaturesState commonLigaturesState) { m_common
LigaturesState = commonLigaturesState; updateTypesettingFeatures(); } | 140 void setCommonLigaturesState(LigaturesState commonLigaturesState) { m_common
LigaturesState = commonLigaturesState; updateTypesettingFeatures(); } |
| 147 void setDiscretionaryLigaturesState(LigaturesState discretionaryLigaturesSta
te) { m_discretionaryLigaturesState = discretionaryLigaturesState; updateTypeset
tingFeatures(); } | 141 void setDiscretionaryLigaturesState(LigaturesState discretionaryLigaturesSta
te) { m_discretionaryLigaturesState = discretionaryLigaturesState; updateTypeset
tingFeatures(); } |
| 148 void setHistoricalLigaturesState(LigaturesState historicalLigaturesState) {
m_historicalLigaturesState = historicalLigaturesState; updateTypesettingFeatures
(); } | 142 void setHistoricalLigaturesState(LigaturesState historicalLigaturesState) {
m_historicalLigaturesState = historicalLigaturesState; updateTypesettingFeatures
(); } |
| 149 void setContextualLigaturesState(LigaturesState contextualLigaturesState) {
m_contextualLigaturesState = contextualLigaturesState; updateTypesettingFeatures
(); } | 143 void setContextualLigaturesState(LigaturesState contextualLigaturesState) {
m_contextualLigaturesState = contextualLigaturesState; updateTypesettingFeatures
(); } |
| 150 void setKeywordSize(unsigned s) { m_keywordSize = s; } | 144 void setKeywordSize(unsigned s) { m_keywordSize = s; } |
| 151 void setFontSmoothing(FontSmoothingMode smoothing) { m_fontSmoothing = smoot
hing; } | 145 void setFontSmoothing(FontSmoothingMode smoothing) { m_fontSmoothing = smoot
hing; } |
| 152 void setTextRendering(TextRenderingMode rendering) { m_textRendering = rende
ring; updateTypesettingFeatures(); } | 146 void setTextRendering(TextRenderingMode rendering) { m_textRendering = rende
ring; updateTypesettingFeatures(); } |
| 153 void setOrientation(FontOrientation orientation) { m_orientation = orientati
on; } | 147 void setOrientation(FontOrientation orientation) { m_orientation = orientati
on; } |
| 154 void setNonCJKGlyphOrientation(NonCJKGlyphOrientation orientation) { m_nonCJ
KGlyphOrientation = orientation; } | 148 void setNonCJKGlyphOrientation(NonCJKGlyphOrientation orientation) { m_nonCJ
KGlyphOrientation = orientation; } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 181 |
| 188 unsigned m_widthVariant : 2; // FontWidthVariant | 182 unsigned m_widthVariant : 2; // FontWidthVariant |
| 189 | 183 |
| 190 unsigned m_style : 1; // FontStyle | 184 unsigned m_style : 1; // FontStyle |
| 191 unsigned m_variant : 1; // FontVariant | 185 unsigned m_variant : 1; // FontVariant |
| 192 unsigned m_isAbsoluteSize : 1; // Whether or not CSS specified an explicit s
ize | 186 unsigned m_isAbsoluteSize : 1; // Whether or not CSS specified an explicit s
ize |
| 193 // (logical sizes like "medium" don't count). | 187 // (logical sizes like "medium" don't count). |
| 194 unsigned m_weight : 4; // FontWeight | 188 unsigned m_weight : 4; // FontWeight |
| 195 unsigned m_stretch : 4; // FontStretch | 189 unsigned m_stretch : 4; // FontStretch |
| 196 unsigned m_genericFamily : 3; // GenericFamilyType | 190 unsigned m_genericFamily : 3; // GenericFamilyType |
| 197 unsigned m_usePrinterFont : 1; | |
| 198 | 191 |
| 199 unsigned m_kerning : 2; // Kerning | 192 unsigned m_kerning : 2; // Kerning |
| 200 | 193 |
| 201 unsigned m_commonLigaturesState : 2; | 194 unsigned m_commonLigaturesState : 2; |
| 202 unsigned m_discretionaryLigaturesState : 2; | 195 unsigned m_discretionaryLigaturesState : 2; |
| 203 unsigned m_historicalLigaturesState : 2; | 196 unsigned m_historicalLigaturesState : 2; |
| 204 unsigned m_contextualLigaturesState : 2; | 197 unsigned m_contextualLigaturesState : 2; |
| 205 | 198 |
| 206 unsigned m_keywordSize : 4; // We cache whether or not a font is currently r
epresented by a CSS keyword (e.g., medium). If so, | 199 unsigned m_keywordSize : 4; // We cache whether or not a font is currently r
epresented by a CSS keyword (e.g., medium). If so, |
| 207 // then we can accurately translate across different
generic families to adjust for different preference settings | 200 // then we can accurately translate across different
generic families to adjust for different preference settings |
| (...skipping 19 matching lines...) Expand all Loading... |
| 227 && m_specifiedSize == other.m_specifiedSize | 220 && m_specifiedSize == other.m_specifiedSize |
| 228 && m_computedSize == other.m_computedSize | 221 && m_computedSize == other.m_computedSize |
| 229 && m_letterSpacing == other.m_letterSpacing | 222 && m_letterSpacing == other.m_letterSpacing |
| 230 && m_wordSpacing == other.m_wordSpacing | 223 && m_wordSpacing == other.m_wordSpacing |
| 231 && m_style == other.m_style | 224 && m_style == other.m_style |
| 232 && m_variant == other.m_variant | 225 && m_variant == other.m_variant |
| 233 && m_isAbsoluteSize == other.m_isAbsoluteSize | 226 && m_isAbsoluteSize == other.m_isAbsoluteSize |
| 234 && m_weight == other.m_weight | 227 && m_weight == other.m_weight |
| 235 && m_stretch == other.m_stretch | 228 && m_stretch == other.m_stretch |
| 236 && m_genericFamily == other.m_genericFamily | 229 && m_genericFamily == other.m_genericFamily |
| 237 && m_usePrinterFont == other.m_usePrinterFont | |
| 238 && m_kerning == other.m_kerning | 230 && m_kerning == other.m_kerning |
| 239 && m_commonLigaturesState == other.m_commonLigaturesState | 231 && m_commonLigaturesState == other.m_commonLigaturesState |
| 240 && m_discretionaryLigaturesState == other.m_discretionaryLigaturesState | 232 && m_discretionaryLigaturesState == other.m_discretionaryLigaturesState |
| 241 && m_historicalLigaturesState == other.m_historicalLigaturesState | 233 && m_historicalLigaturesState == other.m_historicalLigaturesState |
| 242 && m_contextualLigaturesState == other.m_contextualLigaturesState | 234 && m_contextualLigaturesState == other.m_contextualLigaturesState |
| 243 && m_keywordSize == other.m_keywordSize | 235 && m_keywordSize == other.m_keywordSize |
| 244 && m_fontSmoothing == other.m_fontSmoothing | 236 && m_fontSmoothing == other.m_fontSmoothing |
| 245 && m_textRendering == other.m_textRendering | 237 && m_textRendering == other.m_textRendering |
| 246 && m_orientation == other.m_orientation | 238 && m_orientation == other.m_orientation |
| 247 && m_nonCJKGlyphOrientation == other.m_nonCJKGlyphOrientation | 239 && m_nonCJKGlyphOrientation == other.m_nonCJKGlyphOrientation |
| 248 && m_widthVariant == other.m_widthVariant | 240 && m_widthVariant == other.m_widthVariant |
| 249 && m_script == other.m_script | 241 && m_script == other.m_script |
| 250 && m_syntheticBold == other.m_syntheticBold | 242 && m_syntheticBold == other.m_syntheticBold |
| 251 && m_syntheticItalic == other.m_syntheticItalic | 243 && m_syntheticItalic == other.m_syntheticItalic |
| 252 && m_featureSettings == other.m_featureSettings | 244 && m_featureSettings == other.m_featureSettings |
| 253 && m_subpixelTextPosition == other.m_subpixelTextPosition; | 245 && m_subpixelTextPosition == other.m_subpixelTextPosition; |
| 254 } | 246 } |
| 255 | 247 |
| 256 } | 248 } |
| 257 | 249 |
| 258 #endif | 250 #endif |
| OLD | NEW |