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, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. |
6 * Copyright (C) 2008 Holger Hans Peter Freyther | 6 * Copyright (C) 2008 Holger Hans Peter Freyther |
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 Font(const FontDescription&); | 81 Font(const FontDescription&); |
82 ~Font(); | 82 ~Font(); |
83 | 83 |
84 Font(const Font&); | 84 Font(const Font&); |
85 Font& operator=(const Font&); | 85 Font& operator=(const Font&); |
86 | 86 |
87 bool operator==(const Font& other) const; | 87 bool operator==(const Font& other) const; |
88 bool operator!=(const Font& other) const { return !(*this == other); } | 88 bool operator!=(const Font& other) const { return !(*this == other); } |
89 | 89 |
90 const FontDescription& fontDescription() const { return m_fontDescription; } | 90 const FontDescription& fontDescription() const { return m_fontDescription; } |
91 // FIXME: This is currently used by RenderStyle::setWordSpacing and RenderSt
yle::setLetterSpacing. | |
92 // They are being removed. Do NOT add new uses of this function. Use FontBui
lder instead. | |
93 FontDescription& mutableFontDescription() { return m_fontDescription; } | |
94 | 91 |
95 void update(PassRefPtr<FontSelector>) const; | 92 void update(PassRefPtr<FontSelector>) const; |
96 | 93 |
97 enum CustomFontNotReadyAction { DoNotPaintIfFontNotReady, UseFallbackIfFontN
otReady }; | 94 enum CustomFontNotReadyAction { DoNotPaintIfFontNotReady, UseFallbackIfFontN
otReady }; |
98 void drawText(GraphicsContext*, const TextRunPaintInfo&, const FloatPoint&,
CustomFontNotReadyAction = DoNotPaintIfFontNotReady) const; | 95 void drawText(GraphicsContext*, const TextRunPaintInfo&, const FloatPoint&,
CustomFontNotReadyAction = DoNotPaintIfFontNotReady) const; |
99 void drawEmphasisMarks(GraphicsContext*, const TextRunPaintInfo&, const Atom
icString& mark, const FloatPoint&) const; | 96 void drawEmphasisMarks(GraphicsContext*, const TextRunPaintInfo&, const Atom
icString& mark, const FloatPoint&) const; |
100 | 97 |
101 float width(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts =
0, GlyphOverflow* = 0) const; | 98 float width(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts =
0, GlyphOverflow* = 0) const; |
102 float width(const TextRun&, int& charsConsumed, Glyph& glyphId) const; | 99 float width(const TextRun&, int& charsConsumed, Glyph& glyphId) const; |
103 | 100 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 { | 212 { |
216 if (!tabSize) | 213 if (!tabSize) |
217 return fontDescription().letterSpacing(); | 214 return fontDescription().letterSpacing(); |
218 float tabWidth = tabSize * fontData.spaceWidth() + fontDescription().letterS
pacing(); | 215 float tabWidth = tabSize * fontData.spaceWidth() + fontDescription().letterS
pacing(); |
219 return tabWidth - fmodf(position, tabWidth); | 216 return tabWidth - fmodf(position, tabWidth); |
220 } | 217 } |
221 | 218 |
222 } | 219 } |
223 | 220 |
224 #endif | 221 #endif |
OLD | NEW |