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

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

Issue 1027373002: Font variations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 5 years, 7 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') | tests/FontConfigParser.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 // SkTypes will include Windows.h, which will pull in all of the GDI defines. 9 // SkTypes will include Windows.h, which will pull in all of the GDI defines.
10 // GDI #defines GetGlyphIndices to GetGlyphIndicesA or GetGlyphIndicesW, but 10 // GDI #defines GetGlyphIndices to GetGlyphIndicesA or GetGlyphIndicesW, but
(...skipping 24 matching lines...) Expand all
35 void DWriteFontTypeface::onGetFontDescriptor(SkFontDescriptor* desc, 35 void DWriteFontTypeface::onGetFontDescriptor(SkFontDescriptor* desc,
36 bool* isLocalStream) const { 36 bool* isLocalStream) const {
37 // Get the family name. 37 // Get the family name.
38 SkTScopedComPtr<IDWriteLocalizedStrings> familyNames; 38 SkTScopedComPtr<IDWriteLocalizedStrings> familyNames;
39 HRV(fDWriteFontFamily->GetFamilyNames(&familyNames)); 39 HRV(fDWriteFontFamily->GetFamilyNames(&familyNames));
40 40
41 SkString utf8FamilyName; 41 SkString utf8FamilyName;
42 sk_get_locale_string(familyNames.get(), NULL/*fMgr->fLocaleName.get()*/, &ut f8FamilyName); 42 sk_get_locale_string(familyNames.get(), NULL/*fMgr->fLocaleName.get()*/, &ut f8FamilyName);
43 43
44 desc->setFamilyName(utf8FamilyName.c_str()); 44 desc->setFamilyName(utf8FamilyName.c_str());
45 desc->setFontIndex(fDWriteFontFace->GetIndex());
46 *isLocalStream = SkToBool(fDWriteFontFileLoader.get()); 45 *isLocalStream = SkToBool(fDWriteFontFileLoader.get());
47 } 46 }
48 47
49 static SkUnichar next_utf8(const void** chars) { 48 static SkUnichar next_utf8(const void** chars) {
50 return SkUTF8_NextUnichar((const char**)chars); 49 return SkUTF8_NextUnichar((const char**)chars);
51 } 50 }
52 51
53 static SkUnichar next_utf16(const void** chars) { 52 static SkUnichar next_utf16(const void** chars) {
54 return SkUTF16_NextUnichar((const uint16_t**)chars); 53 return SkUTF16_NextUnichar((const uint16_t**)chars);
55 } 54 }
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 getAdvanceData(fDWriteFontFace.get(), 454 getAdvanceData(fDWriteFontFace.get(),
456 glyphCount, 455 glyphCount,
457 glyphIDs, 456 glyphIDs,
458 glyphIDsCount, 457 glyphIDsCount,
459 getWidthAdvance)); 458 getWidthAdvance));
460 } 459 }
461 } 460 }
462 461
463 return info; 462 return info;
464 } 463 }
OLDNEW
« no previous file with comments | « src/ports/SkFontMgr_fontconfig.cpp ('k') | tests/FontConfigParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698