| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 ~Font(); | 67 ~Font(); |
| 68 | 68 |
| 69 Font(const Font&); | 69 Font(const Font&); |
| 70 Font& operator=(const Font&); | 70 Font& operator=(const Font&); |
| 71 | 71 |
| 72 bool operator==(const Font& other) const; | 72 bool operator==(const Font& other) const; |
| 73 bool operator!=(const Font& other) const { return !(*this == other); } | 73 bool operator!=(const Font& other) const { return !(*this == other); } |
| 74 | 74 |
| 75 const FontDescription& getFontDescription() const { return m_fontDescription
; } | 75 const FontDescription& getFontDescription() const { return m_fontDescription
; } |
| 76 | 76 |
| 77 void update(PassRefPtrWillBeRawPtr<FontSelector>) const; | 77 void update(RawPtr<FontSelector>) const; |
| 78 | 78 |
| 79 enum CustomFontNotReadyAction { DoNotPaintIfFontNotReady, UseFallbackIfFontN
otReady }; | 79 enum CustomFontNotReadyAction { DoNotPaintIfFontNotReady, UseFallbackIfFontN
otReady }; |
| 80 bool drawText(SkCanvas*, const TextRunPaintInfo&, const FloatPoint&, float d
eviceScaleFactor, const SkPaint&) const; | 80 bool drawText(SkCanvas*, const TextRunPaintInfo&, const FloatPoint&, float d
eviceScaleFactor, const SkPaint&) const; |
| 81 bool drawBidiText(SkCanvas*, const TextRunPaintInfo&, const FloatPoint&, Cus
tomFontNotReadyAction, float deviceScaleFactor, const SkPaint&) const; | 81 bool drawBidiText(SkCanvas*, const TextRunPaintInfo&, const FloatPoint&, Cus
tomFontNotReadyAction, float deviceScaleFactor, const SkPaint&) const; |
| 82 void drawEmphasisMarks(SkCanvas*, const TextRunPaintInfo&, const AtomicStrin
g& mark, const FloatPoint&, float deviceScaleFactor, const SkPaint&) const; | 82 void drawEmphasisMarks(SkCanvas*, const TextRunPaintInfo&, const AtomicStrin
g& mark, const FloatPoint&, float deviceScaleFactor, const SkPaint&) const; |
| 83 | 83 |
| 84 // Glyph bounds will be the minimum rect containing all glyph strokes, in co
ordinates using | 84 // Glyph bounds will be the minimum rect containing all glyph strokes, in co
ordinates using |
| 85 // (<text run x position>, <baseline position>) as the origin. | 85 // (<text run x position>, <baseline position>) as the origin. |
| 86 float width(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts =
nullptr, FloatRect* glyphBounds = nullptr) const; | 86 float width(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts =
nullptr, FloatRect* glyphBounds = nullptr) const; |
| 87 | 87 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // if the distance to the next tab stop is less than that, advance an additi
onal tab stop. | 197 // if the distance to the next tab stop is less than that, advance an additi
onal tab stop. |
| 198 if (distanceToTabStop < std::max(getFontDescription().letterSpacing(), Layou
tUnit::epsilon())) | 198 if (distanceToTabStop < std::max(getFontDescription().letterSpacing(), Layou
tUnit::epsilon())) |
| 199 distanceToTabStop += baseTabWidth; | 199 distanceToTabStop += baseTabWidth; |
| 200 | 200 |
| 201 return distanceToTabStop; | 201 return distanceToTabStop; |
| 202 } | 202 } |
| 203 | 203 |
| 204 } // namespace blink | 204 } // namespace blink |
| 205 | 205 |
| 206 #endif | 206 #endif |
| OLD | NEW |