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

Side by Side Diff: src/ports/SkFontMgr_android.cpp

Issue 2030683002: Update typeface serialization style. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 6 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
« no previous file with comments | « src/ports/SkFontHost_win.cpp ('k') | src/ports/SkFontMgr_custom.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 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
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 "SkTypes.h" 8 #include "SkTypes.h"
9 9
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 SkData* data = SkData::NewFromFILE(fFile); 78 SkData* data = SkData::NewFromFILE(fFile);
79 return data ? new SkMemoryStream(data) : nullptr; 79 return data ? new SkMemoryStream(data) : nullptr;
80 } 80 }
81 return SkStream::NewFromFile(fPathName.c_str()); 81 return SkStream::NewFromFile(fPathName.c_str());
82 } 82 }
83 83
84 virtual void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) co nst override { 84 virtual void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) co nst override {
85 SkASSERT(desc); 85 SkASSERT(desc);
86 SkASSERT(serialize); 86 SkASSERT(serialize);
87 desc->setFamilyName(fFamilyName.c_str()); 87 desc->setFamilyName(fFamilyName.c_str());
88 desc->setStyle(this->fontStyle());
88 *serialize = false; 89 *serialize = false;
89 } 90 }
90 SkStreamAsset* onOpenStream(int* ttcIndex) const override { 91 SkStreamAsset* onOpenStream(int* ttcIndex) const override {
91 *ttcIndex = fIndex; 92 *ttcIndex = fIndex;
92 return this->createStream(); 93 return this->createStream();
93 } 94 }
94 SkFontData* onCreateFontData() const override { 95 SkFontData* onCreateFontData() const override {
95 return new SkFontData(this->createStream(), fIndex, fAxes.begin(), fAxes .count()); 96 return new SkFontData(this->createStream(), fIndex, fAxes.begin(), fAxes .count());
96 } 97 }
97 98
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 SkASSERT(custom->fSystemFontUse < SK_ARRAY_COUNT(gSystemFontUseStrings)) ; 579 SkASSERT(custom->fSystemFontUse < SK_ARRAY_COUNT(gSystemFontUseStrings)) ;
579 SkDEBUGF(("SystemFontUse: %s BasePath: %s Fonts: %s FallbackFonts: %s\n" , 580 SkDEBUGF(("SystemFontUse: %s BasePath: %s Fonts: %s FallbackFonts: %s\n" ,
580 gSystemFontUseStrings[custom->fSystemFontUse], 581 gSystemFontUseStrings[custom->fSystemFontUse],
581 custom->fBasePath, 582 custom->fBasePath,
582 custom->fFontsXml, 583 custom->fFontsXml,
583 custom->fFallbackFontsXml)); 584 custom->fFallbackFontsXml));
584 } 585 }
585 586
586 return new SkFontMgr_Android(custom); 587 return new SkFontMgr_Android(custom);
587 } 588 }
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_win.cpp ('k') | src/ports/SkFontMgr_custom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698