Lines Matching defs:font
275 // font matching, see https://crbug.com/1258378
276 bool HasBitmapStrikes(const SkTScopedComPtr<IDWriteFont>& font) {
278 HRB(font->CreateFontFace(&fontFace));
293 SkTScopedComPtr<IDWriteFont>& font) {
312 font = std::move(searchFont);
372 IDWriteFont* font,
528 IDWriteFont* font,
531 ProtoDWriteTypeface spec = { fontFace, font, fontFamily };
534 face = DWriteFontTypeface::Make(fFactory.get(), fontFace, font, fontFamily, nullptr);
631 HRM(E_INVALIDARG, "Glyph run without font face.");
634 SkTScopedComPtr<IDWriteFont> font;
635 HRM(fOuter->fFontCollection->GetFontFromFontFace(glyphRun->fontFace, &font),
636 "Could not get font from font face.");
638 // It is possible that the font passed does not actually have the requested character,
639 // due to no font being found and getting the fallback font.
640 // Check that the font actually contains the requested character.
642 HRM(font->HasCharacter(fCharacter, &exists), "Could not find character.");
646 HRM(font->GetFontFamily(&fontFamily), "Could not get family.");
648 font.get(),
650 fHasSimulations = (font->GetSimulations() != DWRITE_FONT_SIMULATIONS_NONE) &&
651 !HasBitmapStrikes(font);
843 // and may produce a Japanese font.
852 // LayoutFallback may use the system font collection for fallback.
875 SkTScopedComPtr<IDWriteFont> font;
880 font.reset();
890 &font,
893 if (!font.get()) {
897 DWRITE_FONT_SIMULATIONS simulations = font->GetSimulations();
900 noSimulations = simulations == DWRITE_FONT_SIMULATIONS_NONE || HasBitmapStrikes(font);
917 HRNM(font->CreateFontFace(&fontFace), "Could not get font face from font.");
920 HRNM(font->GetFontFamily(&fontFamily), "Could not get family from font.");
921 return this->makeTypefaceFromDWriteFont(fontFace.get(), font.get(), fontFamily.get());
946 // No matter how the font collection is set on this IDWriteTextLayout, it is not possible to
947 // disable use of the system font collection in fallback.
957 "Could not set layout font collection.");
1084 // Find the first non-simulated font which has the given ttc index.
1092 SkTScopedComPtr<IDWriteFont> font;
1093 HRN(fontFamily->GetFont(fontIndex, &font));
1095 // Skip if the current font is simulated
1096 if (font->GetSimulations() != DWRITE_FONT_SIMULATIONS_NONE) {
1100 HRN(font->CreateFontFace(&fontFace));
1112 fFactory.get(), fontFace.get(), font.get(), fontFamily.get(),
1163 // layoutFallback causes DCHECK in Chromium. (Uses system font collection.)
1165 "Could not create DWrite font family from LOGFONT.");
1169 // Could not obtain the default font.
1171 "Could not get default-default font family.");
1174 SkTScopedComPtr<IDWriteFont> font;
1175 HRNM(FirstMatchingFontWithoutSimulations(fontFamily, dwStyle, font),
1176 "No font found from family.");
1179 HRNM(font->CreateFontFace(&fontFace), "Could not create font face.");
1181 return this->makeTypefaceFromDWriteFont(fontFace.get(), font.get(), fontFamily.get());
1191 SkTScopedComPtr<IDWriteFont> font;
1192 HRNM(fFontFamily->GetFont(index, &font), "Could not get font.");
1195 HRNM(font->CreateFontFace(&fontFace), "Could not create font face.");
1197 return fFontMgr->makeTypefaceFromDWriteFont(fontFace.get(), font.get(), fFontFamily.get()).release();
1201 SkTScopedComPtr<IDWriteFont> font;
1202 HRVM(fFontFamily->GetFont(index, &font), "Could not get font.");
1205 *fs = get_style(font.get());
1210 if (SUCCEEDED(font->GetFaceNames(&faceNames))) {
1217 SkTScopedComPtr<IDWriteFont> font;
1220 HRNM(FirstMatchingFontWithoutSimulations(fFontFamily, dwStyle, font),
1221 "No font found from family.");
1224 HRNM(font->CreateFontFace(&fontFace), "Could not create font face.");
1226 return fFontMgr->makeTypefaceFromDWriteFont(fontFace.get(), font.get(),
1251 "Could not get system font collection.");
1255 // It is possible to have been provided a font fallback when factory2 is not available.