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

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

Issue 2067583002: Revert of Update typeface serialization style. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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());
453 *serialize = false; 452 *serialize = false;
454 } 453 }
455 454
456 SkStreamAsset* onOpenStream(int* ttcIndex) const override { 455 SkStreamAsset* onOpenStream(int* ttcIndex) const override {
457 FCLocker lock; 456 FCLocker lock;
458 *ttcIndex = get_int(fPattern, FC_INDEX, 0); 457 *ttcIndex = get_int(fPattern, FC_INDEX, 0);
459 return SkStream::NewFromFile(get_string(fPattern, FC_FILE)); 458 return SkStream::NewFromFile(get_string(fPattern, FC_FILE));
460 } 459 }
461 460
462 void onFilterRec(SkScalerContextRec* rec) const override { 461 void onFilterRec(SkScalerContextRec* rec) const override {
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 return typeface.release(); 933 return typeface.release();
935 } 934 }
936 935
937 return this->matchFamilyStyle(nullptr, style); 936 return this->matchFamilyStyle(nullptr, style);
938 } 937 }
939 }; 938 };
940 939
941 SK_API SkFontMgr* SkFontMgr_New_FontConfig(FcConfig* fc) { 940 SK_API SkFontMgr* SkFontMgr_New_FontConfig(FcConfig* fc) {
942 return new SkFontMgr_fontconfig(fc); 941 return new SkFontMgr_fontconfig(fc);
943 } 942 }
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