| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 PassRefPtr<SimpleFontData> createScaledFontData(const FontDescription&, floa
t scaleFactor) const; | 155 PassRefPtr<SimpleFontData> createScaledFontData(const FontDescription&, floa
t scaleFactor) const; |
| 156 PassRefPtr<SimpleFontData> platformCreateScaledFontData(const FontDescriptio
n&, float scaleFactor) const; | 156 PassRefPtr<SimpleFontData> platformCreateScaledFontData(const FontDescriptio
n&, float scaleFactor) const; |
| 157 | 157 |
| 158 FontMetrics m_fontMetrics; | 158 FontMetrics m_fontMetrics; |
| 159 float m_maxCharWidth; | 159 float m_maxCharWidth; |
| 160 float m_avgCharWidth; | 160 float m_avgCharWidth; |
| 161 | 161 |
| 162 FontPlatformData m_platformData; | 162 FontPlatformData m_platformData; |
| 163 | 163 |
| 164 mutable OwnPtr<GlyphMetricsMap<FloatRect> > m_glyphToBoundsMap; | 164 mutable OwnPtr<GlyphMetricsMap<FloatRect>> m_glyphToBoundsMap; |
| 165 mutable GlyphMetricsMap<float> m_glyphToWidthMap; | 165 mutable GlyphMetricsMap<float> m_glyphToWidthMap; |
| 166 | 166 |
| 167 bool m_treatAsFixedPitch; | 167 bool m_treatAsFixedPitch; |
| 168 | 168 |
| 169 bool m_isTextOrientationFallback; | 169 bool m_isTextOrientationFallback; |
| 170 bool m_isBrokenIdeographFallback; | 170 bool m_isBrokenIdeographFallback; |
| 171 RefPtr<OpenTypeVerticalData> m_verticalData; | 171 RefPtr<OpenTypeVerticalData> m_verticalData; |
| 172 bool m_hasVerticalGlyphs; | 172 bool m_hasVerticalGlyphs; |
| 173 | 173 |
| 174 Glyph m_spaceGlyph; | 174 Glyph m_spaceGlyph; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 193 private: | 193 private: |
| 194 DerivedFontData(bool custom) | 194 DerivedFontData(bool custom) |
| 195 : forCustomFont(custom) | 195 : forCustomFont(custom) |
| 196 { | 196 { |
| 197 } | 197 } |
| 198 }; | 198 }; |
| 199 | 199 |
| 200 mutable OwnPtr<DerivedFontData> m_derivedFontData; | 200 mutable OwnPtr<DerivedFontData> m_derivedFontData; |
| 201 | 201 |
| 202 RefPtr<CustomFontData> m_customFontData; | 202 RefPtr<CustomFontData> m_customFontData; |
| 203 mutable OwnPtr<HashMap<String, bool> > m_combiningCharacterSequenceSupport; | 203 mutable OwnPtr<HashMap<String, bool>> m_combiningCharacterSequenceSupport; |
| 204 }; | 204 }; |
| 205 | 205 |
| 206 ALWAYS_INLINE FloatRect SimpleFontData::boundsForGlyph(Glyph glyph) const | 206 ALWAYS_INLINE FloatRect SimpleFontData::boundsForGlyph(Glyph glyph) const |
| 207 { | 207 { |
| 208 if (isZeroWidthSpaceGlyph(glyph)) | 208 if (isZeroWidthSpaceGlyph(glyph)) |
| 209 return FloatRect(); | 209 return FloatRect(); |
| 210 | 210 |
| 211 FloatRect bounds; | 211 FloatRect bounds; |
| 212 if (m_glyphToBoundsMap) { | 212 if (m_glyphToBoundsMap) { |
| 213 bounds = m_glyphToBoundsMap->metricsForGlyph(glyph); | 213 bounds = m_glyphToBoundsMap->metricsForGlyph(glyph); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 234 width = platformWidthForGlyph(glyph); | 234 width = platformWidthForGlyph(glyph); |
| 235 | 235 |
| 236 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); | 236 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); |
| 237 return width; | 237 return width; |
| 238 } | 238 } |
| 239 | 239 |
| 240 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); | 240 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); |
| 241 | 241 |
| 242 } // namespace blink | 242 } // namespace blink |
| 243 #endif // SimpleFontData_h | 243 #endif // SimpleFontData_h |
| OLD | NEW |