• Home
  • Raw
  • Download

Lines Matching refs:lf

49 static void call_ensure_accessible(const LOGFONT& lf) {  in call_ensure_accessible()  argument
51 gEnsureLOGFONTAccessibleProc(lf); in call_ensure_accessible()
104 static void dcfontname_to_skstring(HDC deviceContext, const LOGFONT& lf, SkString* familyName) { in dcfontname_to_skstring() argument
107 call_ensure_accessible(lf); in dcfontname_to_skstring()
115 call_ensure_accessible(lf); in dcfontname_to_skstring()
124 static void make_canonical(LOGFONT* lf) { in make_canonical() argument
125 lf->lfHeight = -64; in make_canonical()
126 lf->lfWidth = 0; // lfWidth is related to lfHeight, not to the OS/2::usWidthClass. in make_canonical()
127 lf->lfQuality = CLEARTYPE_QUALITY;//PROOF_QUALITY; in make_canonical()
128 lf->lfCharSet = DEFAULT_CHARSET; in make_canonical()
132 static SkFontStyle get_style(const LOGFONT& lf) { in get_style() argument
133 return SkFontStyle(lf.lfWeight, in get_style()
135 lf.lfItalic ? SkFontStyle::kItalic_Slant : SkFontStyle::kUpright_Slant); in get_style()
153 static unsigned calculateGlyphCount(HDC hdc, const LOGFONT& lf) { in calculateGlyphCount() argument
157 call_ensure_accessible(lf); in calculateGlyphCount()
189 static unsigned calculateUPEM(HDC hdc, const LOGFONT& lf) { in calculateUPEM() argument
193 call_ensure_accessible(lf); in calculateUPEM()
204 call_ensure_accessible(lf); in calculateUPEM()
213 LogFontTypeface(const SkFontStyle& style, const LOGFONT& lf, bool serializeAsStream) in LogFontTypeface() argument
215 , fLogFont(lf) in LogFontTypeface()
218 HFONT font = CreateFontIndirect(&lf); in LogFontTypeface()
225 call_ensure_accessible(lf); in LogFontTypeface()
253 static LogFontTypeface* Create(const LOGFONT& lf) { in Create() argument
254 return new LogFontTypeface(get_style(lf), lf, false); in Create()
295 static FontMemResourceTypeface* Create(const LOGFONT& lf, HANDLE fontMemResource) { in Create() argument
296 return new FontMemResourceTypeface(get_style(lf), lf, fontMemResource); in Create()
310 FontMemResourceTypeface(const SkFontStyle& style, const LOGFONT& lf, HANDLE fontMemResource) in FontMemResourceTypeface() argument
311 : LogFontTypeface(style, lf, true), fFontMemResource(fontMemResource) in FontMemResourceTypeface()
326 const LOGFONT* lf = reinterpret_cast<const LOGFONT*>(ctx); in FindByLogFont() local
328 return !memcmp(&lface->fLogFont, lf, sizeof(LOGFONT)); in FindByLogFont()
336 LOGFONT lf = origLF; in SkCreateTypefaceFromLOGFONT() local
337 make_canonical(&lf); in SkCreateTypefaceFromLOGFONT()
338 SkTypeface* face = SkTypefaceCache::FindByProcAndRef(FindByLogFont, &lf); in SkCreateTypefaceFromLOGFONT()
340 face = LogFontTypeface::Create(lf); in SkCreateTypefaceFromLOGFONT()
350 LOGFONT lf = origLF; in SkCreateFontMemResourceTypefaceFromLOGFONT() local
351 make_canonical(&lf); in SkCreateFontMemResourceTypefaceFromLOGFONT()
353 return FontMemResourceTypeface::Create(lf, fontMemResource); in SkCreateFontMemResourceTypefaceFromLOGFONT()
359 void SkLOGFONTFromTypeface(const SkTypeface* face, LOGFONT* lf) { in SkLOGFONTFromTypeface() argument
361 *lf = get_default_font(); in SkLOGFONTFromTypeface()
363 *lf = static_cast<const LogFontTypeface*>(face)->fLogFont; in SkLOGFONTFromTypeface()
671 LOGFONT lf = typeface->fLogFont; in SkScalerContext_GDI() local
672 lf.lfHeight = -SkScalarTruncToInt(gdiTextSize); in SkScalerContext_GDI()
673 lf.lfQuality = compute_quality(fRec); in SkScalerContext_GDI()
674 fFont = CreateFontIndirect(&lf); in SkScalerContext_GDI()
682 call_ensure_accessible(lf); in SkScalerContext_GDI()
730 call_ensure_accessible(lf); in SkScalerContext_GDI()
1588 static void logfont_for_name(const char* familyName, LOGFONT* lf) { in logfont_for_name() argument
1589 sk_bzero(lf, sizeof(LOGFONT)); in logfont_for_name()
1600 ::wcsncpy(lf->lfFaceName, wideFamilyName, LF_FACESIZE - 1); in logfont_for_name()
1602 lf->lfFaceName[LF_FACESIZE-1] = L'\0'; in logfont_for_name()
1604 ::strncpy(lf->lfFaceName, familyName, LF_FACESIZE - 1); in logfont_for_name()
1605 lf->lfFaceName[LF_FACESIZE - 1] = '\0'; in logfont_for_name()
1640 LOGFONT lf = fLogFont; in getGlyphToUnicodeMap() local
1641 HFONT designFont = CreateFontIndirect(&lf); in getGlyphToUnicodeMap()
1654 LOGFONT lf = fLogFont; in onGetAdvancedMetrics() local
1658 HFONT font = CreateFontIndirect(&lf); in onGetAdvancedMetrics()
1671 call_ensure_accessible(lf); in onGetAdvancedMetrics()
1674 if (!otmRet || !GetTextFace(hdc, LF_FACESIZE, lf.lfFaceName)) { in onGetAdvancedMetrics()
1677 lf.lfHeight = -SkToS32(otm.otmEMSquare); in onGetAdvancedMetrics()
1678 designFont = CreateFontIndirect(&lf); in onGetAdvancedMetrics()
1686 tchar_to_skstring(lf.lfFaceName, &info->fFontName); in onGetAdvancedMetrics()
1852 LOGFONT lf; in create_from_stream() local
1853 logfont_for_name(familyName, &lf); in create_from_stream()
1855 return sk_sp<SkTypeface>(SkCreateFontMemResourceTypefaceFromLOGFONT(lf, fontReference)); in create_from_stream()
1863 LOGFONT lf = fLogFont; in onOpenStream() local
1866 HFONT font = CreateFontIndirect(&lf); in onOpenStream()
1874 call_ensure_accessible(lf); in onOpenStream()
1957 SkAutoHDC(const LOGFONT& lf) in SkAutoHDC() argument
1959 , fFont(::CreateFontIndirect(&lf)) in SkAutoHDC()
2169 LOGFONT lf = fLogFont; in onGetTableData() local
2172 HFONT font = CreateFontIndirect(&lf); in onGetTableData()
2181 call_ensure_accessible(lf); in onGetTableData()
2260 static bool valid_logfont_for_enum(const LOGFONT& lf) { in valid_logfont_for_enum() argument
2264 lf.lfFaceName[0] && lf.lfFaceName[0] != '@' in valid_logfont_for_enum()
2268 && ANSI_CHARSET == lf.lfCharSet in valid_logfont_for_enum()
2276 static int CALLBACK enum_family_proc(const LOGFONT* lf, const TEXTMETRIC*, in enum_family_proc() argument
2278 if (valid_logfont_for_enum(*lf)) { in enum_family_proc()
2280 *array->append() = *(ENUMLOGFONTEX*)lf; in enum_family_proc()
2288 LOGFONT lf; in SkFontStyleSetGDI() local
2289 sk_bzero(&lf, sizeof(lf)); in SkFontStyleSetGDI()
2290 lf.lfCharSet = DEFAULT_CHARSET; in SkFontStyleSetGDI()
2291 _tcscpy_s(lf.lfFaceName, familyName); in SkFontStyleSetGDI()
2294 ::EnumFontFamiliesEx(hdc, &lf, enum_family_proc, (LPARAM)&fArray, 0); in SkFontStyleSetGDI()
2334 LOGFONT lf; in SkFontMgrGDI() local
2335 sk_bzero(&lf, sizeof(lf)); in SkFontMgrGDI()
2336 lf.lfCharSet = DEFAULT_CHARSET; in SkFontMgrGDI()
2339 ::EnumFontFamiliesEx(hdc, &lf, enum_family_proc, (LPARAM)&fLogFontArray, 0); in SkFontMgrGDI()
2362 LOGFONT lf; in onMatchFamily() local
2363 logfont_for_name(familyName, &lf); in onMatchFamily()
2364 return new SkFontStyleSetGDI(lf.lfFaceName); in onMatchFamily()
2409 LOGFONT lf; in onLegacyMakeTypeface() local
2411 lf = get_default_font(); in onLegacyMakeTypeface()
2413 logfont_for_name(familyName, &lf); in onLegacyMakeTypeface()
2416 lf.lfWeight = style.weight(); in onLegacyMakeTypeface()
2417 lf.lfItalic = style.slant() == SkFontStyle::kUpright_Slant ? FALSE : TRUE; in onLegacyMakeTypeface()
2418 return sk_sp<SkTypeface>(SkCreateTypefaceFromLOGFONT(lf)); in onLegacyMakeTypeface()