OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
4 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 void setStyle(FontStyle); | 60 void setStyle(FontStyle); |
61 void setVariant(FontVariant); | 61 void setVariant(FontVariant); |
62 void setVariantLigatures(const FontDescription::VariantLigatures&); | 62 void setVariantLigatures(const FontDescription::VariantLigatures&); |
63 void setTextRendering(TextRenderingMode); | 63 void setTextRendering(TextRenderingMode); |
64 void setKerning(FontDescription::Kerning); | 64 void setKerning(FontDescription::Kerning); |
65 void setFontSmoothing(FontSmoothingMode); | 65 void setFontSmoothing(FontSmoothingMode); |
66 | 66 |
67 // FIXME: These need to just vend a Font object eventually. | 67 // FIXME: These need to just vend a Font object eventually. |
68 void createFont(PassRefPtrWillBeRawPtr<FontSelector>, RenderStyle*); | 68 void createFont(PassRefPtrWillBeRawPtr<FontSelector>, RenderStyle*); |
69 | 69 |
70 void createFontForDocument(PassRefPtrWillBeRawPtr<FontSelector>, RenderStyle
*); | |
71 | |
72 bool fontDirty() const { return m_flags; } | 70 bool fontDirty() const { return m_flags; } |
73 | 71 |
74 static FontDescription::FamilyDescription initialFamilyDescription() { retur
n FontDescription::FamilyDescription(initialGenericFamily()); } | 72 static FontDescription::FamilyDescription initialFamilyDescription() { retur
n FontDescription::FamilyDescription(initialGenericFamily()); } |
75 static FontFeatureSettings* initialFeatureSettings() { return nullptr; } | 73 static FontFeatureSettings* initialFeatureSettings() { return nullptr; } |
76 static FontDescription::GenericFamilyType initialGenericFamily() { return Fo
ntDescription::StandardFamily; } | 74 static FontDescription::GenericFamilyType initialGenericFamily() { return Fo
ntDescription::StandardFamily; } |
77 static FontDescription::Size initialSize() { return FontDescription::Size(Fo
ntSize::initialKeywordSize(), 0.0f, false); } | 75 static FontDescription::Size initialSize() { return FontDescription::Size(Fo
ntSize::initialKeywordSize(), 0.0f, false); } |
78 static TextRenderingMode initialTextRendering() { return AutoTextRendering;
} | 76 static TextRenderingMode initialTextRendering() { return AutoTextRendering;
} |
79 static FontVariant initialVariant() { return FontVariantNormal; } | 77 static FontVariant initialVariant() { return FontVariantNormal; } |
80 static FontDescription::VariantLigatures initialVariantLigatures() { return
FontDescription::VariantLigatures(); } | 78 static FontDescription::VariantLigatures initialVariantLigatures() { return
FontDescription::VariantLigatures(); } |
81 static FontStyle initialStyle() { return FontStyleNormal; } | 79 static FontStyle initialStyle() { return FontStyleNormal; } |
82 static FontDescription::Kerning initialKerning() { return FontDescription::A
utoKerning; } | 80 static FontDescription::Kerning initialKerning() { return FontDescription::A
utoKerning; } |
83 static FontSmoothingMode initialFontSmoothing() { return AutoSmoothing; } | 81 static FontSmoothingMode initialFontSmoothing() { return AutoSmoothing; } |
84 static FontStretch initialStretch() { return FontStretchNormal; } | 82 static FontStretch initialStretch() { return FontStretchNormal; } |
85 static FontWeight initialWeight() { return FontWeightNormal; } | 83 static FontWeight initialWeight() { return FontWeightNormal; } |
86 | 84 |
87 private: | 85 private: |
88 | 86 |
89 void setFamilyDescription(FontDescription&, const FontDescription::FamilyDes
cription&); | |
90 void setSize(FontDescription&, const FontDescription::Size&); | |
91 void updateOrientation(FontDescription&, RenderStyle*); | 87 void updateOrientation(FontDescription&, RenderStyle*); |
92 // This function fixes up the default font size if it detects that the curre
nt generic font family has changed. -dwh | 88 // This function fixes up the default font size if it detects that the curre
nt generic font family has changed. -dwh |
93 void checkForGenericFamilyChange(const FontDescription&, FontDescription&); | 89 void checkForGenericFamilyChange(const FontDescription&, FontDescription&); |
94 void updateSpecifiedSize(FontDescription&, RenderStyle*); | 90 void updateSpecifiedSize(FontDescription&, RenderStyle*); |
95 void updateComputedSize(FontDescription&, RenderStyle*); | 91 void updateComputedSize(FontDescription&, RenderStyle*); |
96 | 92 |
97 float getComputedSizeFromSpecifiedSize(FontDescription&, float effectiveZoom
, float specifiedSize); | 93 float getComputedSizeFromSpecifiedSize(FontDescription&, float effectiveZoom
, float specifiedSize); |
98 | 94 |
99 const Document& m_document; | 95 const Document& m_document; |
100 FontDescription m_fontDescription; | 96 FontDescription m_fontDescription; |
(...skipping 19 matching lines...) Expand all Loading... |
120 | 116 |
121 void set(PropertySetFlag flag) { m_flags |= (1 << unsigned(flag)); } | 117 void set(PropertySetFlag flag) { m_flags |= (1 << unsigned(flag)); } |
122 bool isSet(PropertySetFlag flag) const { return m_flags & (1 << unsigned(fla
g)); } | 118 bool isSet(PropertySetFlag flag) const { return m_flags & (1 << unsigned(fla
g)); } |
123 | 119 |
124 unsigned m_flags; | 120 unsigned m_flags; |
125 }; | 121 }; |
126 | 122 |
127 } | 123 } |
128 | 124 |
129 #endif | 125 #endif |
OLD | NEW |