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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 91 |
92 void update(PassRefPtr<FontSelector>) const; | 92 void update(PassRefPtrWillBeRawPtr<FontSelector>) const; |
93 | 93 |
94 enum CustomFontNotReadyAction { DoNotPaintIfFontNotReady, UseFallbackIfFontN
otReady }; | 94 enum CustomFontNotReadyAction { DoNotPaintIfFontNotReady, UseFallbackIfFontN
otReady }; |
95 void drawText(GraphicsContext*, const TextRunPaintInfo&, const FloatPoint&,
CustomFontNotReadyAction = DoNotPaintIfFontNotReady) const; | 95 void drawText(GraphicsContext*, const TextRunPaintInfo&, const FloatPoint&,
CustomFontNotReadyAction = DoNotPaintIfFontNotReady) const; |
96 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; |
97 | 97 |
98 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; |
99 float width(const TextRun&, int& charsConsumed, Glyph& glyphId) const; | 99 float width(const TextRun&, int& charsConsumed, Glyph& glyphId) const; |
100 | 100 |
101 int offsetForPosition(const TextRun&, float position, bool includePartialGly
phs) const; | 101 int offsetForPosition(const TextRun&, float position, bool includePartialGly
phs) const; |
102 FloatRect selectionRectForText(const TextRun&, const FloatPoint&, int h, int
from = 0, int to = -1, bool accountForGlyphBounds = false) const; | 102 FloatRect selectionRectForText(const TextRun&, const FloatPoint&, int h, int
from = 0, int to = -1, bool accountForGlyphBounds = false) const; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 { | 212 { |
213 if (!tabSize) | 213 if (!tabSize) |
214 return fontDescription().letterSpacing(); | 214 return fontDescription().letterSpacing(); |
215 float tabWidth = tabSize * fontData.spaceWidth() + fontDescription().letterS
pacing(); | 215 float tabWidth = tabSize * fontData.spaceWidth() + fontDescription().letterS
pacing(); |
216 return tabWidth - fmodf(position, tabWidth); | 216 return tabWidth - fmodf(position, tabWidth); |
217 } | 217 } |
218 | 218 |
219 } | 219 } |
220 | 220 |
221 #endif | 221 #endif |
OLD | NEW |