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

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

Issue 1139123008: Revert of Font variations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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());
45 *isLocalStream = SkToBool(fDWriteFontFileLoader.get()); 46 *isLocalStream = SkToBool(fDWriteFontFileLoader.get());
46 } 47 }
47 48
48 static SkUnichar next_utf8(const void** chars) { 49 static SkUnichar next_utf8(const void** chars) {
49 return SkUTF8_NextUnichar((const char**)chars); 50 return SkUTF8_NextUnichar((const char**)chars);
50 } 51 }
51 52
52 static SkUnichar next_utf16(const void** chars) { 53 static SkUnichar next_utf16(const void** chars) {
53 return SkUTF16_NextUnichar((const uint16_t**)chars); 54 return SkUTF16_NextUnichar((const uint16_t**)chars);
54 } 55 }
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 getAdvanceData(fDWriteFontFace.get(), 455 getAdvanceData(fDWriteFontFace.get(),
455 glyphCount, 456 glyphCount,
456 glyphIDs, 457 glyphIDs,
457 glyphIDsCount, 458 glyphIDsCount,
458 getWidthAdvance)); 459 getWidthAdvance));
459 } 460 }
460 } 461 }
461 462
462 return info; 463 return info;
463 } 464 }
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