Lines Matching defs:style
4 * Use of this source code is governed by a BSD-style license that can be
85 const SkFontStyle& style) {
116 if (style.weight() >= SkFontStyle::kBold_Weight) {
119 if (style.slant() != SkFontStyle::kUpright_Slant) {
130 CGFloat ctWeight = SkCTFontCTWeightForCSSWeight(style.weight());
137 CGFloat ctWidth = SkCTFontCTWidthForCSSWidth(style.width());
146 CGFloat ctSlant = style.slant() == SkFontStyle::kUpright_Slant ? 0 : 1;
168 // Same as the above function except style is included so we can
169 // compare whether the created font conforms to the style. If not, we need
173 const SkFontStyle& style) {
181 if (style.slant() != SkFontStyle::kUpright_Slant) {
184 if (style.weight() >= SkFontStyle::kBold_Weight) {
200 static sk_sp<SkTypeface> create_from_name(const char familyName[], const SkFontStyle& style) {
201 SkUniqueCFRef<CTFontDescriptorRef> desc = create_descriptor(familyName, style);
205 return create_from_desc_and_style(desc.get(), style);
315 void getStyle(int index, SkFontStyle* style, SkString* name) override {
318 if (style) {
319 *style = SkCTFontDescriptorGetSkFontStyle(desc, false);
482 const SkFontStyle& style) const override {
483 SkUniqueCFRef<CTFontDescriptorRef> desc = create_descriptor(familyName, style);
488 const SkFontStyle& style,
491 SkUniqueCFRef<CTFontDescriptorRef> desc = create_descriptor(familyName, style);
601 sk_sp<SkTypeface> onLegacyMakeTypeface(const char familyName[], SkFontStyle style) const override {
606 sk_sp<SkTypeface> face = create_from_name(familyName, style);