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

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

Issue 1057413005: Remove filename from SkFontDescriptor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add file name to assert. Created 5 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
« no previous file with comments | « src/ports/SkFontMgr_android.cpp ('k') | no next file » | 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 "SkDataTable.h" 8 #include "SkDataTable.h"
9 #include "SkFontDescriptor.h" 9 #include "SkFontDescriptor.h"
10 #include "SkFontHost_FreeType_common.h" 10 #include "SkFontHost_FreeType_common.h"
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 413
414 void onGetFamilyName(SkString* familyName) const override { 414 void onGetFamilyName(SkString* familyName) const override {
415 *familyName = get_string(fPattern, FC_FAMILY); 415 *familyName = get_string(fPattern, FC_FAMILY);
416 } 416 }
417 417
418 void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const over ride { 418 void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const over ride {
419 FCLocker lock; 419 FCLocker lock;
420 desc->setFamilyName(get_string(fPattern, FC_FAMILY)); 420 desc->setFamilyName(get_string(fPattern, FC_FAMILY));
421 desc->setFullName(get_string(fPattern, FC_FULLNAME)); 421 desc->setFullName(get_string(fPattern, FC_FULLNAME));
422 desc->setPostscriptName(get_string(fPattern, FC_POSTSCRIPT_NAME)); 422 desc->setPostscriptName(get_string(fPattern, FC_POSTSCRIPT_NAME));
423 desc->setFontFileName(get_string(fPattern, FC_FILE));
424 desc->setFontIndex(get_int(fPattern, FC_INDEX, 0)); 423 desc->setFontIndex(get_int(fPattern, FC_INDEX, 0));
425 *serialize = false; 424 *serialize = false;
426 } 425 }
427 426
428 SkStreamAsset* onOpenStream(int* ttcIndex) const override { 427 SkStreamAsset* onOpenStream(int* ttcIndex) const override {
429 FCLocker lock; 428 FCLocker lock;
430 *ttcIndex = get_int(fPattern, FC_INDEX, 0); 429 *ttcIndex = get_int(fPattern, FC_INDEX, 0);
431 return SkStream::NewFromFile(get_string(fPattern, FC_FILE)); 430 return SkStream::NewFromFile(get_string(fPattern, FC_FILE));
432 } 431 }
433 432
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 return typeface.detach(); 847 return typeface.detach();
849 } 848 }
850 849
851 return this->matchFamilyStyle(NULL, style); 850 return this->matchFamilyStyle(NULL, style);
852 } 851 }
853 }; 852 };
854 853
855 SkFontMgr* SkFontMgr::Factory() { 854 SkFontMgr* SkFontMgr::Factory() {
856 return SkNEW(SkFontMgr_fontconfig); 855 return SkNEW(SkFontMgr_fontconfig);
857 } 856 }
OLDNEW
« no previous file with comments | « src/ports/SkFontMgr_android.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698