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

Side by Side Diff: src/core/SkTypeface.cpp

Issue 66783003: Remove SK_FONTHOST_USES_FONTMGR. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 | « src/core/SkFontHost.cpp ('k') | src/fonts/SkGScalerContext.h » ('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 * Copyright 2011 The Android Open Source Project 2 * Copyright 2011 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkAdvancedTypefaceMetrics.h" 8 #include "SkAdvancedTypefaceMetrics.h"
9 #include "SkFontDescriptor.h" 9 #include "SkFontDescriptor.h"
10 #include "SkFontHost.h" 10 #include "SkFontHost.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 public: 62 public:
63 virtual bool next(SkTypeface::LocalizedString*) SK_OVERRIDE { return fal se; } 63 virtual bool next(SkTypeface::LocalizedString*) SK_OVERRIDE { return fal se; }
64 }; 64 };
65 virtual SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_ OVERRIDE { 65 virtual SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_ OVERRIDE {
66 return SkNEW(EmptyLocalizedStrings); 66 return SkNEW(EmptyLocalizedStrings);
67 }; 67 };
68 virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE { return 0; } 68 virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE { return 0; }
69 virtual size_t onGetTableData(SkFontTableTag, size_t, size_t, void*) const S K_OVERRIDE { 69 virtual size_t onGetTableData(SkFontTableTag, size_t, size_t, void*) const S K_OVERRIDE {
70 return 0; 70 return 0;
71 } 71 }
72 virtual SkTypeface* onRefMatchingStyle(Style) const SK_OVERRIDE { return NUL L; }
73 }; 72 };
74 73
75 SkTypeface* SkTypeface::GetDefaultTypeface(Style style) { 74 SkTypeface* SkTypeface::GetDefaultTypeface(Style style) {
76 // we keep a reference to this guy for all time, since if we return its 75 // we keep a reference to this guy for all time, since if we return its
77 // fontID, the font cache may later on ask to resolve that back into a 76 // fontID, the font cache may later on ask to resolve that back into a
78 // typeface object. 77 // typeface object.
79 static const uint32_t FONT_STYLE_COUNT = 4; 78 static const uint32_t FONT_STYLE_COUNT = 4;
80 static SkTypeface* gDefaultTypefaces[FONT_STYLE_COUNT]; 79 static SkTypeface* gDefaultTypefaces[FONT_STYLE_COUNT];
81 SkASSERT((unsigned)style < FONT_STYLE_COUNT); 80 SkASSERT((unsigned)style < FONT_STYLE_COUNT);
82 81
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 name->set(desc.getFamilyName()); 257 name->set(desc.getFamilyName());
259 } 258 }
260 259
261 SkAdvancedTypefaceMetrics* SkTypeface::getAdvancedTypefaceMetrics( 260 SkAdvancedTypefaceMetrics* SkTypeface::getAdvancedTypefaceMetrics(
262 SkAdvancedTypefaceMetrics::PerGlyphInfo info, 261 SkAdvancedTypefaceMetrics::PerGlyphInfo info,
263 const uint32_t* glyphIDs, 262 const uint32_t* glyphIDs,
264 uint32_t glyphIDsCount) const { 263 uint32_t glyphIDsCount) const {
265 return this->onGetAdvancedTypefaceMetrics(info, glyphIDs, glyphIDsCount); 264 return this->onGetAdvancedTypefaceMetrics(info, glyphIDs, glyphIDsCount);
266 } 265 }
267 266
268 SkTypeface* SkTypeface::refMatchingStyle(Style style) const {
269 return this->onRefMatchingStyle(style);
270 }
271
272 /////////////////////////////////////////////////////////////////////////////// 267 ///////////////////////////////////////////////////////////////////////////////
273 268
274 bool SkTypeface::onGetKerningPairAdjustments(const uint16_t glyphs[], int count, 269 bool SkTypeface::onGetKerningPairAdjustments(const uint16_t glyphs[], int count,
275 int32_t adjustments[]) const { 270 int32_t adjustments[]) const {
276 return false; 271 return false;
277 } 272 }
OLDNEW
« no previous file with comments | « src/core/SkFontHost.cpp ('k') | src/fonts/SkGScalerContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698