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

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

Issue 212863008: Merge SimpleFontData.cpp and SimpleFontDataSkia.cpp (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/fonts/SimpleFontData.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength) const; 153 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength) const;
154 154
155 protected: 155 protected:
156 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat a, bool isTextOrientationFallback = false); 156 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat a, bool isTextOrientationFallback = false);
157 157
158 SimpleFontData(PassRefPtr<CustomFontData> customData, float fontSize, bool s yntheticBold, bool syntheticItalic); 158 SimpleFontData(PassRefPtr<CustomFontData> customData, float fontSize, bool s yntheticBold, bool syntheticItalic);
159 159
160 private: 160 private:
161 void platformInit(); 161 void platformInit();
162 void platformGlyphInit(); 162 void platformGlyphInit();
163 void platformCharWidthInit();
164 void platformDestroy();
165 163
166 PassRefPtr<SimpleFontData> createScaledFontData(const FontDescription&, floa t scaleFactor) const; 164 PassRefPtr<SimpleFontData> createScaledFontData(const FontDescription&, floa t scaleFactor) const;
167 PassRefPtr<SimpleFontData> platformCreateScaledFontData(const FontDescriptio n&, float scaleFactor) const; 165 PassRefPtr<SimpleFontData> platformCreateScaledFontData(const FontDescriptio n&, float scaleFactor) const;
168 166
169 FontMetrics m_fontMetrics; 167 FontMetrics m_fontMetrics;
170 float m_maxCharWidth; 168 float m_maxCharWidth;
171 float m_avgCharWidth; 169 float m_avgCharWidth;
172 170
173 FontPlatformData m_platformData; 171 FontPlatformData m_platformData;
174 172
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 width = platformWidthForGlyph(glyph); 252 width = platformWidthForGlyph(glyph);
255 253
256 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); 254 m_glyphToWidthMap.setMetricsForGlyph(glyph, width);
257 return width; 255 return width;
258 } 256 }
259 257
260 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); 258 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false);
261 259
262 } // namespace blink 260 } // namespace blink
263 #endif // SimpleFontData_h 261 #endif // SimpleFontData_h
OLDNEW
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/fonts/SimpleFontData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698