| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 protected: | 130 protected: |
| 131 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat
a, bool isTextOrientationFallback = false); | 131 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat
a, bool isTextOrientationFallback = false); |
| 132 | 132 |
| 133 SimpleFontData(PassRefPtr<CustomFontData> customData, float fontSize, bool s
yntheticBold, bool syntheticItalic); | 133 SimpleFontData(PassRefPtr<CustomFontData> customData, float fontSize, bool s
yntheticBold, bool syntheticItalic); |
| 134 | 134 |
| 135 private: | 135 private: |
| 136 void platformInit(); | 136 void platformInit(); |
| 137 void platformGlyphInit(); | 137 void platformGlyphInit(); |
| 138 | 138 |
| 139 PassRefPtr<SimpleFontData> createScaledFontData(const FontDescription&, floa
t scaleFactor) const; | 139 PassRefPtr<SimpleFontData> createScaledFontData(const FontDescription&, floa
t scaleFactor) const; |
| 140 PassRefPtr<SimpleFontData> platformCreateScaledFontData(const FontDescriptio
n&, float scaleFactor) const; | |
| 141 | 140 |
| 142 FontMetrics m_fontMetrics; | 141 FontMetrics m_fontMetrics; |
| 143 float m_maxCharWidth; | 142 float m_maxCharWidth; |
| 144 float m_avgCharWidth; | 143 float m_avgCharWidth; |
| 145 | 144 |
| 146 FontPlatformData m_platformData; | 145 FontPlatformData m_platformData; |
| 147 | 146 |
| 148 mutable OwnPtr<GlyphMetricsMap<FloatRect>> m_glyphToBoundsMap; | 147 mutable OwnPtr<GlyphMetricsMap<FloatRect>> m_glyphToBoundsMap; |
| 149 mutable GlyphMetricsMap<float> m_glyphToWidthMap; | 148 mutable GlyphMetricsMap<float> m_glyphToWidthMap; |
| 150 | 149 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 width = platformWidthForGlyph(glyph); | 210 width = platformWidthForGlyph(glyph); |
| 212 | 211 |
| 213 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); | 212 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); |
| 214 return width; | 213 return width; |
| 215 } | 214 } |
| 216 | 215 |
| 217 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); | 216 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); |
| 218 | 217 |
| 219 } // namespace blink | 218 } // namespace blink |
| 220 #endif // SimpleFontData_h | 219 #endif // SimpleFontData_h |
| OLD | NEW |