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

Side by Side Diff: src/ports/SkFontConfigTypeface.h

Issue 2147733002: Remove user specified typeface id. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove one last straggler. Created 4 years, 5 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/fonts/SkTestScalerContext.cpp ('k') | src/ports/SkFontHost_FreeType_common.h » ('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 2013 Google Inc. 2 * Copyright 2013 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 "SkFontConfigInterface.h" 8 #include "SkFontConfigInterface.h"
9 #include "SkFontHost_FreeType_common.h" 9 #include "SkFontHost_FreeType_common.h"
10 #include "SkStream.h" 10 #include "SkStream.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 bool isFamilyName(const char* name) const { 44 bool isFamilyName(const char* name) const {
45 return fFamilyName.equals(name); 45 return fFamilyName.equals(name);
46 } 46 }
47 47
48 protected: 48 protected:
49 SkTypeface_FCI(SkFontConfigInterface* fci, 49 SkTypeface_FCI(SkFontConfigInterface* fci,
50 const SkFontConfigInterface::FontIdentity& fi, 50 const SkFontConfigInterface::FontIdentity& fi,
51 const SkString& familyName, 51 const SkString& familyName,
52 const SkFontStyle& style) 52 const SkFontStyle& style)
53 : INHERITED(style, SkTypefaceCache::NewFontID(), false) 53 : INHERITED(style, false)
54 , fFCI(SkRef(fci)) 54 , fFCI(SkRef(fci))
55 , fIdentity(fi) 55 , fIdentity(fi)
56 , fFamilyName(familyName) 56 , fFamilyName(familyName)
57 , fLocalStream(nullptr) {} 57 , fLocalStream(nullptr) {}
58 58
59 SkTypeface_FCI(const SkFontStyle& style, bool fixedWidth, SkStreamAsset* loc alStream, int index) 59 SkTypeface_FCI(const SkFontStyle& style, bool fixedWidth, SkStreamAsset* loc alStream, int index)
60 : INHERITED(style, SkTypefaceCache::NewFontID(), fixedWidth) 60 : INHERITED(style, fixedWidth)
61 , fLocalStream(localStream) 61 , fLocalStream(localStream)
62 { 62 {
63 fIdentity.fTTCIndex = index; 63 fIdentity.fTTCIndex = index;
64 } 64 }
65 65
66 void onGetFamilyName(SkString* familyName) const override { *familyName = fF amilyName; } 66 void onGetFamilyName(SkString* familyName) const override { *familyName = fF amilyName; }
67 void onGetFontDescriptor(SkFontDescriptor*, bool*) const override; 67 void onGetFontDescriptor(SkFontDescriptor*, bool*) const override;
68 SkStreamAsset* onOpenStream(int* ttcIndex) const override; 68 SkStreamAsset* onOpenStream(int* ttcIndex) const override;
69 69
70 private: 70 private:
71 typedef SkTypeface_FreeType INHERITED; 71 typedef SkTypeface_FreeType INHERITED;
72 }; 72 };
OLDNEW
« no previous file with comments | « src/fonts/SkTestScalerContext.cpp ('k') | src/ports/SkFontHost_FreeType_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698