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

Side by Side Diff: src/ports/SkFontMgr_fontconfig.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/SkFontMgr_custom.cpp ('k') | src/ports/SkTypeface_win_dw.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 "SkDataTable.h" 8 #include "SkDataTable.h"
9 #include "SkFixed.h" 9 #include "SkFixed.h"
10 #include "SkFontDescriptor.h" 10 #include "SkFontDescriptor.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 442
443 void onGetFamilyName(SkString* familyName) const override { 443 void onGetFamilyName(SkString* familyName) const override {
444 *familyName = get_string(fPattern, FC_FAMILY); 444 *familyName = get_string(fPattern, FC_FAMILY);
445 } 445 }
446 446
447 void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const over ride { 447 void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const over ride {
448 FCLocker lock; 448 FCLocker lock;
449 desc->setFamilyName(get_string(fPattern, FC_FAMILY)); 449 desc->setFamilyName(get_string(fPattern, FC_FAMILY));
450 desc->setFullName(get_string(fPattern, FC_FULLNAME)); 450 desc->setFullName(get_string(fPattern, FC_FULLNAME));
451 desc->setPostscriptName(get_string(fPattern, FC_POSTSCRIPT_NAME)); 451 desc->setPostscriptName(get_string(fPattern, FC_POSTSCRIPT_NAME));
452 desc->setStyle(this->fontStyle());
452 *serialize = false; 453 *serialize = false;
453 } 454 }
454 455
455 SkStreamAsset* onOpenStream(int* ttcIndex) const override { 456 SkStreamAsset* onOpenStream(int* ttcIndex) const override {
456 FCLocker lock; 457 FCLocker lock;
457 *ttcIndex = get_int(fPattern, FC_INDEX, 0); 458 *ttcIndex = get_int(fPattern, FC_INDEX, 0);
458 return SkStream::NewFromFile(get_string(fPattern, FC_FILE)); 459 return SkStream::NewFromFile(get_string(fPattern, FC_FILE));
459 } 460 }
460 461
461 void onFilterRec(SkScalerContextRec* rec) const override { 462 void onFilterRec(SkScalerContextRec* rec) const override {
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 return typeface.release(); 934 return typeface.release();
934 } 935 }
935 936
936 return this->matchFamilyStyle(nullptr, style); 937 return this->matchFamilyStyle(nullptr, style);
937 } 938 }
938 }; 939 };
939 940
940 SK_API SkFontMgr* SkFontMgr_New_FontConfig(FcConfig* fc) { 941 SK_API SkFontMgr* SkFontMgr_New_FontConfig(FcConfig* fc) {
941 return new SkFontMgr_fontconfig(fc); 942 return new SkFontMgr_fontconfig(fc);
942 } 943 }
OLDNEW
« no previous file with comments | « src/ports/SkFontMgr_custom.cpp ('k') | src/ports/SkTypeface_win_dw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698