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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 } | 157 } |
158 | 158 |
159 CustomFontData* customFontData() const { return m_customFontData.get(); } | 159 CustomFontData* customFontData() const { return m_customFontData.get(); } |
160 | 160 |
161 protected: | 161 protected: |
162 SimpleFontData(const FontPlatformData&, | 162 SimpleFontData(const FontPlatformData&, |
163 PassRefPtr<CustomFontData> customData, | 163 PassRefPtr<CustomFontData> customData, |
164 bool isTextOrientationFallback = false, | 164 bool isTextOrientationFallback = false, |
165 bool subpixelAscentDescent = false); | 165 bool subpixelAscentDescent = false); |
166 | 166 |
167 SimpleFontData(PassRefPtr<CustomFontData> customData, | 167 // Only used for testing. |
168 float fontSize, | 168 SimpleFontData(const FontPlatformData&, PassRefPtr<OpenTypeVerticalData>); |
169 bool syntheticBold, | |
170 bool syntheticItalic); | |
171 | 169 |
172 private: | 170 private: |
173 void platformInit(bool subpixelAscentDescent); | 171 void platformInit(bool subpixelAscentDescent); |
174 void platformGlyphInit(); | 172 void platformGlyphInit(); |
175 | 173 |
176 PassRefPtr<SimpleFontData> createScaledFontData(const FontDescription&, | 174 PassRefPtr<SimpleFontData> createScaledFontData(const FontDescription&, |
177 float scaleFactor) const; | 175 float scaleFactor) const; |
178 | 176 |
179 FontMetrics m_fontMetrics; | 177 FontMetrics m_fontMetrics; |
180 float m_maxCharWidth; | 178 float m_maxCharWidth; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 253 |
256 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); | 254 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); |
257 return width; | 255 return width; |
258 #endif | 256 #endif |
259 } | 257 } |
260 | 258 |
261 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); | 259 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); |
262 | 260 |
263 } // namespace blink | 261 } // namespace blink |
264 #endif // SimpleFontData_h | 262 #endif // SimpleFontData_h |
OLD | NEW |