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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/SimpleFontData.h

Issue 2427773002: Fixing superscript and subscript baseline for tiny fonts in SVG
Patch Set: Rebaseline Created 3 years, 10 months 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
OLDNEW
1 /* 1 /*
2 * This file is part of the internal font implementation. 2 * This file is part of the internal font implementation.
3 * 3 *
4 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved.
5 * Copyright (C) 2007-2008 Torch Mobile, Inc. 5 * Copyright (C) 2007-2008 Torch Mobile, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 case AutoVariant: 93 case AutoVariant:
94 case NormalVariant: 94 case NormalVariant:
95 break; 95 break;
96 } 96 }
97 ASSERT_NOT_REACHED(); 97 ASSERT_NOT_REACHED();
98 return const_cast<SimpleFontData*>(this); 98 return const_cast<SimpleFontData*>(this);
99 } 99 }
100 100
101 PassRefPtr<SimpleFontData> verticalRightOrientationFontData() const; 101 PassRefPtr<SimpleFontData> verticalRightOrientationFontData() const;
102 PassRefPtr<SimpleFontData> uprightOrientationFontData() const; 102 PassRefPtr<SimpleFontData> uprightOrientationFontData() const;
103 PassRefPtr<SimpleFontData> subpixelAscentDescentFontData() const;
103 104
104 bool hasVerticalGlyphs() const { return m_hasVerticalGlyphs; } 105 bool hasVerticalGlyphs() const { return m_hasVerticalGlyphs; }
105 bool isTextOrientationFallback() const { return m_isTextOrientationFallback; } 106 bool isTextOrientationFallback() const { return m_isTextOrientationFallback; }
106 bool isTextOrientationFallbackOf(const SimpleFontData*) const; 107 bool isTextOrientationFallbackOf(const SimpleFontData*) const;
107 108
108 FontMetrics& getFontMetrics() { return m_fontMetrics; } 109 FontMetrics& getFontMetrics() { return m_fontMetrics; }
109 const FontMetrics& getFontMetrics() const { return m_fontMetrics; } 110 const FontMetrics& getFontMetrics() const { return m_fontMetrics; }
110 float sizePerUnit() const { 111 float sizePerUnit() const {
111 return platformData().size() / 112 return platformData().size() /
112 (getFontMetrics().unitsPerEm() ? getFontMetrics().unitsPerEm() : 1); 113 (getFontMetrics().unitsPerEm() ? getFontMetrics().unitsPerEm() : 1);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 255
255 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); 256 m_glyphToWidthMap.setMetricsForGlyph(glyph, width);
256 return width; 257 return width;
257 #endif 258 #endif
258 } 259 }
259 260
260 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); 261 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false);
261 262
262 } // namespace blink 263 } // namespace blink
263 #endif // SimpleFontData_h 264 #endif // SimpleFontData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698