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

Side by Side Diff: src/ports/SkTypeface_win_dw.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_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());
49 *isLocalStream = SkToBool(fDWriteFontFileLoader.get()); 48 *isLocalStream = SkToBool(fDWriteFontFileLoader.get());
50 } 49 }
51 50
52 static SkUnichar next_utf8(const void** chars) { 51 static SkUnichar next_utf8(const void** chars) {
53 return SkUTF8_NextUnichar((const char**)chars); 52 return SkUTF8_NextUnichar((const char**)chars);
54 } 53 }
55 54
56 static SkUnichar next_utf16(const void** chars) { 55 static SkUnichar next_utf16(const void** chars) {
57 return SkUTF16_NextUnichar((const uint16_t**)chars); 56 return SkUTF16_NextUnichar((const uint16_t**)chars);
58 } 57 }
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 SkAdvancedTypefaceMetrics::GetAdvance([borrowedFontFace](int gId , int16_t* data) { 458 SkAdvancedTypefaceMetrics::GetAdvance([borrowedFontFace](int gId , int16_t* data) {
460 return getWidthAdvance(borrowedFontFace, gId, data); 459 return getWidthAdvance(borrowedFontFace, gId, data);
461 }) 460 })
462 ); 461 );
463 } 462 }
464 } 463 }
465 464
466 return info; 465 return info;
467 } 466 }
468 #endif//defined(SK_BUILD_FOR_WIN32) 467 #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