Home
last modified time | relevance | path

Searched refs:familyName (Results 1 – 25 of 78) sorted by relevance

1234

/third_party/skia/modules/skparagraph/src/
DTypefaceFontProvider.cpp14 void TypefaceFontProvider::onGetFamilyName(int index, SkString* familyName) const { in onGetFamilyName()
16 familyName->set(fFamilyNames[index]); in onGetFamilyName()
19 SkFontStyleSet* TypefaceFontProvider::onMatchFamily(const char familyName[]) const { in onMatchFamily()
20 auto found = fRegisteredFamilies.find(SkString(familyName)); in onMatchFamily()
32 SkString familyName; in registerTypeface() local
33 typeface->getFamilyName(&familyName); in registerTypeface()
35 return registerTypeface(std::move(typeface), std::move(familyName)); in registerTypeface()
38 …_t TypefaceFontProvider::registerTypeface(sk_sp<SkTypeface> typeface, const SkString& familyName) { in registerTypeface() argument
39 if (familyName.size() == 0) { in registerTypeface()
43 auto found = fRegisteredFamilies.find(familyName); in registerTypeface()
[all …]
DFontCollection.cpp93 for (const SkString& familyName : familyNames) { in findTypefaces() local
94 sk_sp<SkTypeface> match = matchTypeface(familyName, fontStyle); in findTypefaces()
105 for (const SkString& familyName : fDefaultFamilyNames) { in findTypefaces() local
106 match = matchTypeface(familyName, fontStyle); in findTypefaces()
128 sk_sp<SkTypeface> FontCollection::matchTypeface(const SkString& familyName, SkFontStyle fontStyle) { in matchTypeface() argument
130 sk_sp<SkFontStyleSet> set(manager->matchFamily(familyName.c_str())); in matchTypeface()
165 for (const SkString& familyName : fDefaultFamilyNames) { in defaultFallback() local
166 …_sp<SkTypeface> match = sk_sp<SkTypeface>(fDefaultFontManager->matchFamilyStyle(familyName.c_str(), in defaultFallback()
/third_party/skia/src/ports/
DSkFontMgr_custom.cpp28 bool sysFont, const SkString familyName, int index) in SkTypeface_Custom() argument
30 , fIsSysFont(sysFont), fFamilyName(familyName), fIndex(index) in SkTypeface_Custom()
35 void SkTypeface_Custom::onGetFamilyName(SkString* familyName) const { in onGetFamilyName()
36 *familyName = fFamilyName; in onGetFamilyName()
60 const SkString familyName) in SkTypeface_Stream() argument
61 : INHERITED(style, isFixedPitch, sysFont, familyName, fontData->getIndex()) in SkTypeface_Stream()
80 SkString familyName; in onMakeClone() local
81 this->getFamilyName(&familyName); in onMakeClone()
87 familyName); in onMakeClone()
91 const SkString familyName, const char path[], int index) in SkTypeface_File() argument
[all …]
DSkFontConfigTypeface.h28 SkString familyName, in Create() argument
31 return new SkTypeface_FCI(std::move(fci), fi, std::move(familyName), style); in Create()
35 SkString familyName, SkFontStyle style, bool isFixedPitch) in Create() argument
37 return new SkTypeface_FCI(std::move(data), std::move(familyName), style, isFixedPitch); in Create()
58 SkString familyName, in SkTypeface_FCI() argument
63 , fFamilyName(std::move(familyName)) in SkTypeface_FCI()
67 SkString familyName, SkFontStyle style, bool isFixedPitch) in SkTypeface_FCI() argument
69 , fFamilyName(std::move(familyName)) in SkTypeface_FCI()
76 void onGetFamilyName(SkString* familyName) const override { *familyName = fFamilyName; } in onGetFamilyName() argument
DSkFontMgr_preview.h35 const SkString& familyName) in SkTypeface_Preview() argument
37 , fFamilyName(familyName) in SkTypeface_Preview()
43 void onGetFamilyName(SkString* familyName) const override in onGetFamilyName() argument
45 *familyName = fFamilyName; in onGetFamilyName()
61 const SkString& familyName, in SkTypeface_PreviewSystem() argument
64 : INHERITED(style, isFixedPitch, familyName) in SkTypeface_PreviewSystem()
136 const SkString& familyName) in SkTypeface_PreviewStream() argument
137 : INHERITED(style, isFixedPitch, familyName) in SkTypeface_PreviewStream()
202 SkString familyName; in SkFontStyleSet_Preview() local
208 &familyName, &style, &isFixedWidth, &axisDefinitions)) { in SkFontStyleSet_Preview()
[all …]
DSkFontMgr_android.cpp38 const SkString& familyName) in SkTypeface_Android() argument
40 , fFamilyName(familyName) in SkTypeface_Android()
44 void onGetFamilyName(SkString* familyName) const override { in onGetFamilyName()
45 *familyName = fFamilyName; in onGetFamilyName()
62 const SkString& familyName, in SkTypeface_AndroidSystem() argument
65 : INHERITED(style, isFixedPitch, familyName) in SkTypeface_AndroidSystem()
132 const SkString& familyName) in SkTypeface_AndroidStream() argument
133 : INHERITED(style, isFixedPitch, familyName) in SkTypeface_AndroidStream()
196 SkString familyName; in SkFontStyleSet_Android() local
201 &familyName, &style, &isFixedWidth, &axisDefinitions)) in SkFontStyleSet_Android()
[all …]
DSkFontMgr_preview.cpp28 void SkFontMgr_Preview::onGetFamilyName(int index, SkString* familyName) const in onGetFamilyName()
31 familyName->reset(); in onGetFamilyName()
34 familyName->set(fNameToFamilyMap[index].name); in onGetFamilyName()
45 SkFontStyleSet* SkFontMgr_Preview::onMatchFamily(const char familyName[]) const in onMatchFamily()
47 if (!familyName) { in onMatchFamily()
50 SkAutoAsciiToLC tolc(familyName); in onMatchFamily()
65 SkTypeface* SkFontMgr_Preview::onMatchFamilyStyle(const char familyName[], const SkFontStyle& style… in onMatchFamilyStyle() argument
67 sk_sp<SkFontStyleSet> sset(this->matchFamily(familyName)); in onMatchFamilyStyle()
84 const SkString& familyName, in find_family_style_character() argument
91 if (familyName != family->fFallbackFor) { in find_family_style_character()
[all …]
DSkFontMgr_custom.h28 bool sysFont, const SkString familyName, int index);
32 void onGetFamilyName(SkString* familyName) const override;
65 const SkString familyName);
82 const SkString familyName, const char path[], int index);
104 explicit SkFontStyleSet_Custom(const SkString familyName);
140 void onGetFamilyName(int index, SkString* familyName) const override;
142 SkFontStyleSet_Custom* onMatchFamily(const char familyName[]) const override;
143 SkTypeface* onMatchFamilyStyle(const char familyName[],
145 SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&,
152 … sk_sp<SkTypeface> onLegacyMakeTypeface(const char familyName[], SkFontStyle style) const override;
DSkFontMgr_mac_ct.cpp84 static SkUniqueCFRef<CTFontDescriptorRef> create_descriptor(const char familyName[], in create_descriptor() argument
157 if (familyName) { in create_descriptor()
158 SkUniqueCFRef<CFStringRef> cfFontName = make_CFString(familyName); in create_descriptor()
200 static sk_sp<SkTypeface> create_from_name(const char familyName[], const SkFontStyle& style) { in create_from_name() argument
201 SkUniqueCFRef<CTFontDescriptorRef> desc = create_descriptor(familyName, style); in create_from_name()
375 SkUniqueCFRef<CFTypeRef> familyName( in SkCopyAvailableFontFamilyNames() local
377 if (familyName) { in SkCopyAvailableFontFamilyNames()
378 CFSetAddValue(familyNameSet, familyName.get()); in SkCopyAvailableFontFamilyNames()
458 void onGetFamilyName(int index, SkString* familyName) const override { in onGetFamilyName()
460 SkStringFromCFString(this->getFamilyNameAt(index), familyName); in onGetFamilyName()
[all …]
DSkFontMgr_fuchsia.cpp192 bool isFixedPitch, const SkString familyName, TypefaceId id) in SkTypeface_Fuchsia() argument
194 /*sys_font=*/true, familyName) in SkTypeface_Fuchsia()
238 void onGetFamilyName(int index, SkString* familyName) const override;
239 SkFontStyleSet* onMatchFamily(const char familyName[]) const override;
241 SkTypeface* onMatchFamilyStyle(const char familyName[], const SkFontStyle&) const override;
242 SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&,
251 sk_sp<SkTypeface> onLegacyMakeTypeface(const char familyName[], SkFontStyle) const override;
256 sk_sp<SkTypeface> FetchTypeface(const char familyName[], const SkFontStyle& style,
276 SkFontStyleSet_Fuchsia(sk_sp<SkFontMgr_Fuchsia> font_manager, std::string familyName, in SkFontStyleSet_Fuchsia() argument
278 : fFontManager(font_manager), fFamilyName(familyName), fStyles(styles) {} in SkFontStyleSet_Fuchsia()
[all …]
DSkFontMgr_fontconfig.cpp402 SkString familyName, const SkFontStyle& style, bool fixedWidth) in SkTypeface_stream() argument
404 , fFamilyName(std::move(familyName)) in SkTypeface_stream()
408 void onGetFamilyName(SkString* familyName) const override { in onGetFamilyName()
409 *familyName = fFamilyName; in onGetFamilyName()
452 void onGetFamilyName(SkString* familyName) const override { in onGetFamilyName()
453 *familyName = get_string(fPattern, FC_FAMILY); in onGetFamilyName()
528 SkString familyName; in onMakeClone() local
529 this->getFamilyName(&familyName); in onMakeClone()
532 familyName, in onMakeClone()
669 const char* familyName = reinterpret_cast<const char*>(fcFamilyName); in GetFamilyNames() local
[all …]
/third_party/skia/tools/fonts/
DTestFontMgr.cpp29 FontStyleSet(const char* familyName) : fFamilyName(familyName) {} in FontStyleSet() argument
111 void onGetFamilyName(int index, SkString* familyName) const override { in onGetFamilyName()
112 *familyName = fFamilies[index]->getFamilyName(); in onGetFamilyName()
120 SkFontStyleSet* onMatchFamily(const char familyName[]) const override { in onMatchFamily()
121 if (familyName) { in onMatchFamily()
122 if (strstr(familyName, "ono")) { in onMatchFamily()
125 if (strstr(familyName, "ans")) { in onMatchFamily()
128 if (strstr(familyName, "erif")) { in onMatchFamily()
132 if (strstr(familyName, "oji")) { in onMatchFamily()
135 if (strstr(familyName, "Planet")) { in onMatchFamily()
[all …]
/third_party/skia/src/ports/skia_ohos/
DSkFontMgr_ohos.cpp33 void SkFontMgr_OHOS::onGetFamilyName(int index, SkString* familyName) const in onGetFamilyName()
35 if (fontConfig == nullptr || familyName == nullptr) { in onGetFamilyName()
38 fontConfig->getFamilyName(index, familyName); in onGetFamilyName()
65 SkFontStyleSet* SkFontMgr_OHOS::onMatchFamily(const char familyName[]) const in onMatchFamily()
71 if (familyName == nullptr) { in onMatchFamily()
76 int index = fontConfig->getStyleIndex(familyName, isFallback); in onMatchFamily()
91 SkTypeface* SkFontMgr_OHOS::onMatchFamilyStyle(const char familyName[], const SkFontStyle& style) c… in onMatchFamilyStyle() argument
98 if (familyName) { in onMatchFamilyStyle()
99 styleIndex = fontConfig->getStyleIndex(familyName, isFallback); in onMatchFamilyStyle()
116 SkTypeface* SkFontMgr_OHOS::onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&… in onMatchFamilyStyleCharacter() argument
[all …]
DSkTypeface_ohos.cpp17 SkTypeface_OHOS::SkTypeface_OHOS(const SkString& familyName, FontInfo& info) in SkTypeface_OHOS() argument
19 specifiedName(familyName) in SkTypeface_OHOS()
83 SkString familyName; in onGetFontDescriptor() local
84 onGetFamilyName(&familyName); in onGetFontDescriptor()
85 descriptor->setFamilyName(familyName.c_str()); in onGetFontDescriptor()
93 void SkTypeface_OHOS::onGetFamilyName(SkString* familyName) const in onGetFamilyName()
95 if (familyName == nullptr) { in onGetFamilyName()
99 *familyName = specifiedName; in onGetFamilyName()
102 *familyName = fontInfo->familyName; in onGetFamilyName()
126 axisValues, fontInfo->familyName); in onMakeClone()
DFontConfig_ohos.cpp91 int FontConfig_OHOS::getDefaultFamily(SkString* familyName) const in getDefaultFamily()
93 return getFamilyName(0, familyName); in getDefaultFamily()
102 int FontConfig_OHOS::getFamilyName(int index, SkString* familyName) const in getFamilyName()
105 if (familyName) { in getFamilyName()
106 familyName->reset(); in getFamilyName()
110 if (familyName) { in getFamilyName()
111 *familyName = genericFamilySet[index]->familyName; in getFamilyName()
205 int FontConfig_OHOS::getStyleIndex(const char* familyName, bool& isFallback) const in getStyleIndex() argument
207 if (familyName == nullptr) { in getStyleIndex()
217 SkString fname(familyName); in getStyleIndex()
[all …]
DFontInfo_ohos.h22 FontInfo() : familyName(""), fname(""), index(0), in FontInfo()
31 : familyName(font.familyName), fname(font.fname), index(font.index), in FontInfo()
45 : familyName(std::move(font.familyName)), fname(std::move(font.fname)), index(font.index), in FontInfo()
60 : familyName(""), fname(""), index(index), in FontInfo()
82 familyName = font.familyName;
103 familyName = std::move(font.familyName);
132 SkString familyName; // the real family name of the font member
DFontConfig_ohos.h89 SkString familyName; // the specified family name of the font style set member
112 int getDefaultFamily(SkString* familyName) const;
113 int getFamilyName(int index, SkString* familyName) const;
115 int getStyleIndex(const char* familyName, bool& isFallback) const;
179 SkString familyName; // the family name of the first typeface in a ttc font member
219 int parseTtcIndex(const Json::Value& root, const SkString& familyName);
224 TypefaceSet* getTypefaceSet(const SkString& familyName, SkString& specifiedName) const;
230 std::shared_ptr<TypefaceSet>& subSet, const SkString& familyName, int weight);
DSkFontMgr_ohos.h28 virtual void onGetFamilyName(int index, SkString* familyName) const override;
31 virtual SkFontStyleSet* onMatchFamily(const char familyName[]) const override;
33 virtual SkTypeface* onMatchFamilyStyle(const char familyName[],
35 … virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle& style,
49 …virtual sk_sp<SkTypeface> onLegacyMakeTypeface(const char familyName[], SkFontStyle style) const o…
/third_party/skia/include/core/
DSkFontMgr.h45 void getFamilyName(int index, SkString* familyName) const;
70 SkFontStyleSet* matchFamily(const char familyName[]) const;
84 SkTypeface* matchFamilyStyle(const char familyName[], const SkFontStyle&) const;
101 SkTypeface* matchFamilyStyleCharacter(const char familyName[], const SkFontStyle&,
130 sk_sp<SkTypeface> legacyMakeTypeface(const char familyName[], SkFontStyle style) const;
150 virtual void onGetFamilyName(int index, SkString* familyName) const = 0;
154 virtual SkFontStyleSet* onMatchFamily(const char familyName[]) const = 0;
156 virtual SkTypeface* onMatchFamilyStyle(const char familyName[],
158 virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&,
169 virtual sk_sp<SkTypeface> onLegacyMakeTypeface(const char familyName[], SkFontStyle) const = 0;
/third_party/skia/src/core/
DSkFontMgr.cpp41 void onGetFamilyName(int index, SkString* familyName) const override { in onGetFamilyName()
55 SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], in onMatchFamilyStyleCharacter() argument
92 void SkFontMgr::getFamilyName(int index, SkString* familyName) const { in getFamilyName()
93 this->onGetFamilyName(index, familyName); in getFamilyName()
100 SkFontStyleSet* SkFontMgr::matchFamily(const char familyName[]) const { in matchFamily()
101 return emptyOnNull(this->onMatchFamily(familyName)); in matchFamily()
104 SkTypeface* SkFontMgr::matchFamilyStyle(const char familyName[], in matchFamilyStyle() argument
106 return this->onMatchFamilyStyle(familyName, fs); in matchFamilyStyle()
109 SkTypeface* SkFontMgr::matchFamilyStyleCharacter(const char familyName[], const SkFontStyle& style, in matchFamilyStyleCharacter() argument
112 return this->onMatchFamilyStyleCharacter(familyName, style, bcp47, bcp47Count, character); in matchFamilyStyleCharacter()
[all …]
/third_party/skia/src/fonts/
DSkFontMgr_indirect.cpp66 void SkFontMgr_Indirect::onGetFamilyName(int index, SkString* familyName) const { in onGetFamilyName()
74 SkFontStyleSet* SkFontMgr_Indirect::onMatchFamily(const char familyName[]) const { in onMatchFamily()
75 return new SkStyleSet_Indirect(this, -1, fProxy->matchName(familyName)); in onMatchFamily()
137 SkTypeface* SkFontMgr_Indirect::onMatchFamilyStyle(const char familyName[], in onMatchFamilyStyle() argument
139 SkFontIdentity id = fProxy->matchNameStyle(familyName, fontStyle); in onMatchFamilyStyle()
143 SkTypeface* SkFontMgr_Indirect::onMatchFamilyStyleCharacter(const char familyName[], in onMatchFamilyStyleCharacter() argument
148 SkFontIdentity id = fProxy->matchNameStyleCharacter(familyName, style, bcp47, in onMatchFamilyStyleCharacter()
171 sk_sp<SkTypeface> SkFontMgr_Indirect::onLegacyMakeTypeface(const char familyName[], in onLegacyMakeTypeface() argument
173 sk_sp<SkTypeface> face(this->matchFamilyStyle(familyName, style)); in onLegacyMakeTypeface()
/third_party/skia/src/utils/
DSkOrderedFontMgr.cpp26 void SkOrderedFontMgr::onGetFamilyName(int index, SkString* familyName) const { in onGetFamilyName()
30 return fm->getFamilyName(index, familyName); in onGetFamilyName()
47 SkFontStyleSet* SkOrderedFontMgr::onMatchFamily(const char familyName[]) const { in onMatchFamily()
49 if (auto fs = fm->matchFamily(familyName)) { in onMatchFamily()
66 SkTypeface* SkOrderedFontMgr::onMatchFamilyStyleCharacter(const char familyName[], in onMatchFamilyStyleCharacter() argument
71 if (auto tf = fm->matchFamilyStyleCharacter(familyName, style, bcp47, bcp47Count, uni)) { in onMatchFamilyStyleCharacter()
/third_party/skia/include/utils/
DSkOrderedFontMgr.h29 void onGetFamilyName(int index, SkString* familyName) const override;
32 SkFontStyleSet* onMatchFamily(const char familyName[]) const override;
34 SkTypeface* onMatchFamilyStyle(const char familyName[], const SkFontStyle&) const override;
35 SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&,
47 sk_sp<SkTypeface> onLegacyMakeTypeface(const char familyName[], SkFontStyle) const override;
/third_party/skia/include/ports/
DSkFontMgr_indirect.h36 void onGetFamilyName(int index, SkString* familyName) const override;
39 SkFontStyleSet* onMatchFamily(const char familyName[]) const override;
41 SkTypeface* onMatchFamilyStyle(const char familyName[],
44 SkTypeface* onMatchFamilyStyleCharacter(const char familyName[],
55 sk_sp<SkTypeface> onLegacyMakeTypeface(const char familyName[], SkFontStyle) const override;
/third_party/skia/docs/examples/
DSkFontMgr_example2.cpp20 SkString familyName; in draw() local
21 mgr->getFamilyName(i, &familyName); in draw()
30 familyName.c_str(), fontStyle.weight(), fontStyle.width(), in draw()
32 SkFont font(mgr->legacyMakeTypeface(familyName.c_str(), fontStyle), textScale); in draw()

1234