OLD | NEW |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 return const_cast<SimpleFontData*>(this); | 76 return const_cast<SimpleFontData*>(this); |
77 } | 77 } |
78 | 78 |
79 PassRefPtr<SimpleFontData> verticalRightOrientationFontData() const; | 79 PassRefPtr<SimpleFontData> verticalRightOrientationFontData() const; |
80 PassRefPtr<SimpleFontData> uprightOrientationFontData() const; | 80 PassRefPtr<SimpleFontData> uprightOrientationFontData() const; |
81 | 81 |
82 bool hasVerticalGlyphs() const { return m_hasVerticalGlyphs; } | 82 bool hasVerticalGlyphs() const { return m_hasVerticalGlyphs; } |
83 bool isTextOrientationFallback() const { return m_isTextOrientationFallback;
} | 83 bool isTextOrientationFallback() const { return m_isTextOrientationFallback;
} |
84 bool isTextOrientationFallbackOf(const SimpleFontData*) const; | 84 bool isTextOrientationFallbackOf(const SimpleFontData*) const; |
85 | 85 |
86 FontMetrics& fontMetrics() { return m_fontMetrics; } | 86 FontMetrics& getFontMetrics() { return m_fontMetrics; } |
87 const FontMetrics& fontMetrics() const { return m_fontMetrics; } | 87 const FontMetrics& getFontMetrics() const { return m_fontMetrics; } |
88 float sizePerUnit() const { return platformData().size() / (fontMetrics().un
itsPerEm() ? fontMetrics().unitsPerEm() : 1); } | 88 float sizePerUnit() const { return platformData().size() / (getFontMetrics()
.unitsPerEm() ? getFontMetrics().unitsPerEm() : 1); } |
89 float internalLeading() const { return fontMetrics().floatHeight() - platfor
mData().size(); } | 89 float internalLeading() const { return getFontMetrics().floatHeight() - plat
formData().size(); } |
90 | 90 |
91 float maxCharWidth() const { return m_maxCharWidth; } | 91 float maxCharWidth() const { return m_maxCharWidth; } |
92 void setMaxCharWidth(float maxCharWidth) { m_maxCharWidth = maxCharWidth; } | 92 void setMaxCharWidth(float maxCharWidth) { m_maxCharWidth = maxCharWidth; } |
93 | 93 |
94 float avgCharWidth() const { return m_avgCharWidth; } | 94 float avgCharWidth() const { return m_avgCharWidth; } |
95 void setAvgCharWidth(float avgCharWidth) { m_avgCharWidth = avgCharWidth; } | 95 void setAvgCharWidth(float avgCharWidth) { m_avgCharWidth = avgCharWidth; } |
96 | 96 |
97 FloatRect boundsForGlyph(Glyph) const; | 97 FloatRect boundsForGlyph(Glyph) const; |
98 float widthForGlyph(Glyph glyph) const; | 98 float widthForGlyph(Glyph glyph) const; |
99 FloatRect platformBoundsForGlyph(Glyph) const; | 99 FloatRect platformBoundsForGlyph(Glyph) const; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 width = platformWidthForGlyph(glyph); | 211 width = platformWidthForGlyph(glyph); |
212 | 212 |
213 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); | 213 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); |
214 return width; | 214 return width; |
215 } | 215 } |
216 | 216 |
217 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); | 217 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); |
218 | 218 |
219 } // namespace blink | 219 } // namespace blink |
220 #endif // SimpleFontData_h | 220 #endif // SimpleFontData_h |
OLD | NEW |