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

Side by Side Diff: src/ports/SkTypeface_win_dw.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_fontconfig.cpp ('k') | src/utils/SkWhitelistTypefaces.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 #if defined(SK_BUILD_FOR_WIN32) 9 #if defined(SK_BUILD_FOR_WIN32)
10 10
(...skipping 27 matching lines...) Expand all
38 void DWriteFontTypeface::onGetFontDescriptor(SkFontDescriptor* desc, 38 void DWriteFontTypeface::onGetFontDescriptor(SkFontDescriptor* desc,
39 bool* isLocalStream) const { 39 bool* isLocalStream) const {
40 // Get the family name. 40 // Get the family name.
41 SkTScopedComPtr<IDWriteLocalizedStrings> familyNames; 41 SkTScopedComPtr<IDWriteLocalizedStrings> familyNames;
42 HRV(fDWriteFontFamily->GetFamilyNames(&familyNames)); 42 HRV(fDWriteFontFamily->GetFamilyNames(&familyNames));
43 43
44 SkString utf8FamilyName; 44 SkString utf8FamilyName;
45 sk_get_locale_string(familyNames.get(), nullptr/*fMgr->fLocaleName.get()*/, &utf8FamilyName); 45 sk_get_locale_string(familyNames.get(), nullptr/*fMgr->fLocaleName.get()*/, &utf8FamilyName);
46 46
47 desc->setFamilyName(utf8FamilyName.c_str()); 47 desc->setFamilyName(utf8FamilyName.c_str());
48 desc->setStyle(this->fontStyle());
48 *isLocalStream = SkToBool(fDWriteFontFileLoader.get()); 49 *isLocalStream = SkToBool(fDWriteFontFileLoader.get());
49 } 50 }
50 51
51 static SkUnichar next_utf8(const void** chars) { 52 static SkUnichar next_utf8(const void** chars) {
52 return SkUTF8_NextUnichar((const char**)chars); 53 return SkUTF8_NextUnichar((const char**)chars);
53 } 54 }
54 55
55 static SkUnichar next_utf16(const void** chars) { 56 static SkUnichar next_utf16(const void** chars) {
56 return SkUTF16_NextUnichar((const uint16_t**)chars); 57 return SkUTF16_NextUnichar((const uint16_t**)chars);
57 } 58 }
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 SkAdvancedTypefaceMetrics::GetAdvance([borrowedFontFace](int gId , int16_t* data) { 459 SkAdvancedTypefaceMetrics::GetAdvance([borrowedFontFace](int gId , int16_t* data) {
459 return getWidthAdvance(borrowedFontFace, gId, data); 460 return getWidthAdvance(borrowedFontFace, gId, data);
460 }) 461 })
461 ); 462 );
462 } 463 }
463 } 464 }
464 465
465 return info; 466 return info;
466 } 467 }
467 #endif//defined(SK_BUILD_FOR_WIN32) 468 #endif//defined(SK_BUILD_FOR_WIN32)
OLDNEW
« no previous file with comments | « src/ports/SkFontMgr_fontconfig.cpp ('k') | src/utils/SkWhitelistTypefaces.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698