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

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

Issue 240003002: Add unit test for GlyphPageTreeNode. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: more tests Created 6 years, 8 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
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; 168 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const;
169 169
170 bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t, Typeset tingFeatures) const 170 bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t, Typeset tingFeatures) const
171 { 171 {
172 return false; 172 return false;
173 } 173 }
174 174
175 PassRefPtr<CustomFontData> customFontData() const { return m_customFontData; } 175 PassRefPtr<CustomFontData> customFontData() const { return m_customFontData; }
176 176
177 private: 177 // Implemented by the platform.
178 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength) const;
179
180 protected:
178 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat a, bool isTextOrientationFallback = false); 181 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat a, bool isTextOrientationFallback = false);
179 182
180 SimpleFontData(PassRefPtr<CustomFontData> customData, float fontSize, bool s yntheticBold, bool syntheticItalic); 183 SimpleFontData(PassRefPtr<CustomFontData> customData, float fontSize, bool s yntheticBold, bool syntheticItalic);
181 184
185 private:
182 void platformInit(); 186 void platformInit();
183 void platformGlyphInit(); 187 void platformGlyphInit();
184 void platformCharWidthInit(); 188 void platformCharWidthInit();
185 void platformDestroy(); 189 void platformDestroy();
186 190
187 void initCharWidths(); 191 void initCharWidths();
188 192
189 PassRefPtr<SimpleFontData> createScaledFontData(const FontDescription&, floa t scaleFactor) const; 193 PassRefPtr<SimpleFontData> createScaledFontData(const FontDescription&, floa t scaleFactor) const;
190 PassRefPtr<SimpleFontData> platformCreateScaledFontData(const FontDescriptio n&, float scaleFactor) const; 194 PassRefPtr<SimpleFontData> platformCreateScaledFontData(const FontDescriptio n&, float scaleFactor) const;
191 195
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 #endif 294 #endif
291 else 295 else
292 width = platformWidthForGlyph(glyph); 296 width = platformWidthForGlyph(glyph);
293 297
294 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); 298 m_glyphToWidthMap.setMetricsForGlyph(glyph, width);
295 return width; 299 return width;
296 } 300 }
297 301
298 } // namespace WebCore 302 } // namespace WebCore
299 #endif // SimpleFontData_h 303 #endif // SimpleFontData_h
OLDNEW
« no previous file with comments | « Source/platform/fonts/GlyphPageTreeNodeTest.cpp ('k') | Source/platform/fonts/mac/GlyphPageTreeNodeMac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698