Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: Source/platform/fonts/Font.h

Issue 665253003: Remove SVGTextMetrics::m_glyph (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop WTFString.h include. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/svg/SVGTextMetricsBuilder.cpp ('k') | Source/platform/fonts/Font.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 void update(PassRefPtrWillBeRawPtr<FontSelector>) const; 100 void update(PassRefPtrWillBeRawPtr<FontSelector>) const;
101 101
102 enum CustomFontNotReadyAction { DoNotPaintIfFontNotReady, UseFallbackIfFontN otReady }; 102 enum CustomFontNotReadyAction { DoNotPaintIfFontNotReady, UseFallbackIfFontN otReady };
103 void drawText(GraphicsContext*, const TextRunPaintInfo&, const FloatPoint&) const; 103 void drawText(GraphicsContext*, const TextRunPaintInfo&, const FloatPoint&) const;
104 float drawUncachedText(GraphicsContext*, const TextRunPaintInfo&, const Floa tPoint&, 104 float drawUncachedText(GraphicsContext*, const TextRunPaintInfo&, const Floa tPoint&,
105 CustomFontNotReadyAction) const; 105 CustomFontNotReadyAction) const;
106 void drawEmphasisMarks(GraphicsContext*, const TextRunPaintInfo&, const Atom icString& mark, const FloatPoint&) const; 106 void drawEmphasisMarks(GraphicsContext*, const TextRunPaintInfo&, const Atom icString& mark, const FloatPoint&) const;
107 107
108 float width(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const; 108 float width(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
109 float width(const TextRun&, int& charsConsumed, Glyph& glyphId) const;
110 109
111 int offsetForPosition(const TextRun&, float position, bool includePartialGly phs) const; 110 int offsetForPosition(const TextRun&, float position, bool includePartialGly phs) const;
112 FloatRect selectionRectForText(const TextRun&, const FloatPoint&, int h, int from = 0, int to = -1, bool accountForGlyphBounds = false) const; 111 FloatRect selectionRectForText(const TextRun&, const FloatPoint&, int h, int from = 0, int to = -1, bool accountForGlyphBounds = false) const;
113 112
114 bool isFixedPitch() const; 113 bool isFixedPitch() const;
115 114
116 // Metrics that we query the FontFallbackList for. 115 // Metrics that we query the FontFallbackList for.
117 const FontMetrics& fontMetrics() const { return primaryFont()->fontMetrics() ; } 116 const FontMetrics& fontMetrics() const { return primaryFont()->fontMetrics() ; }
118 float spaceWidth() const { return primaryFont()->spaceWidth() + fontDescript ion().letterSpacing(); } 117 float spaceWidth() const { return primaryFont()->spaceWidth() + fontDescript ion().letterSpacing(); }
119 float tabWidth(const SimpleFontData&, unsigned tabSize, float position) cons t; 118 float tabWidth(const SimpleFontData&, unsigned tabSize, float position) cons t;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 { 210 {
212 if (!tabSize) 211 if (!tabSize)
213 return fontDescription().letterSpacing(); 212 return fontDescription().letterSpacing();
214 float tabWidth = tabSize * fontData.spaceWidth() + fontDescription().letterS pacing(); 213 float tabWidth = tabSize * fontData.spaceWidth() + fontDescription().letterS pacing();
215 return tabWidth - fmodf(position, tabWidth); 214 return tabWidth - fmodf(position, tabWidth);
216 } 215 }
217 216
218 } // namespace blink 217 } // namespace blink
219 218
220 #endif 219 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/SVGTextMetricsBuilder.cpp ('k') | Source/platform/fonts/Font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698