• Home
  • Raw
  • Download

Lines Matching refs:lf

86 static void make_canonical(LOGFONT* lf) {  in make_canonical()  argument
87 lf->lfHeight = -gCanonicalTextSize; in make_canonical()
88 lf->lfQuality = CLEARTYPE_QUALITY;//PROOF_QUALITY; in make_canonical()
89 lf->lfCharSet = DEFAULT_CHARSET; in make_canonical()
93 static SkTypeface::Style get_style(const LOGFONT& lf) { in get_style() argument
95 if (lf.lfWeight >= FW_BOLD) { in get_style()
98 if (lf.lfItalic) { in get_style()
104 static void setStyle(LOGFONT* lf, SkTypeface::Style style) { in setStyle() argument
105 lf->lfWeight = (style & SkTypeface::kBold) != 0 ? FW_BOLD : FW_NORMAL ; in setStyle()
106 lf->lfItalic = ((style & SkTypeface::kItalic) != 0); in setStyle()
146 LogFontTypeface(SkTypeface::Style style, SkFontID fontID, const LOGFONT& lf) : in LogFontTypeface() argument
147 SkTypeface(style, fontID, false), fLogFont(lf) {} in LogFontTypeface()
151 static LogFontTypeface* Create(const LOGFONT& lf) { in Create() argument
152 SkTypeface::Style style = get_style(lf); in Create()
154 return new LogFontTypeface(style, fontID, lf); in Create()
165 const LOGFONT* lf = reinterpret_cast<const LOGFONT*>(ctx); in FindByLogFont() local
168 !memcmp(&lface->fLogFont, lf, sizeof(LOGFONT)); in FindByLogFont()
176 LOGFONT lf = origLF; in SkCreateTypefaceFromLOGFONT() local
177 make_canonical(&lf); in SkCreateTypefaceFromLOGFONT()
178 SkTypeface* face = SkTypefaceCache::FindByProcAndRef(FindByLogFont, &lf); in SkCreateTypefaceFromLOGFONT()
180 face = LogFontTypeface::Create(lf); in SkCreateTypefaceFromLOGFONT()
181 SkTypefaceCache::Add(face, get_style(lf)); in SkCreateTypefaceFromLOGFONT()
189 void SkLOGFONTFromTypeface(const SkTypeface* face, LOGFONT* lf) { in SkLOGFONTFromTypeface() argument
191 *lf = get_default_font(); in SkLOGFONTFromTypeface()
193 *lf = ((const LogFontTypeface*)face)->fLogFont; in SkLOGFONTFromTypeface()
211 static void GetLogFontByID(SkFontID fontID, LOGFONT* lf) { in GetLogFontByID() argument
214 *lf = face->fLogFont; in GetLogFontByID()
216 sk_bzero(lf, sizeof(LOGFONT)); in GetLogFontByID()
504 LOGFONT lf; in SkScalerContext_Windows() local
505 GetLogFontByID(fRec.fFontID, &lf); in SkScalerContext_Windows()
506 lf.lfHeight = -gCanonicalTextSize; in SkScalerContext_Windows()
507 lf.lfQuality = compute_quality(fRec); in SkScalerContext_Windows()
508 fFont = CreateFontIndirect(&lf); in SkScalerContext_Windows()
513 lf.lfHeight = -HIRES_TEXTSIZE; in SkScalerContext_Windows()
514 fHiResFont = CreateFontIndirect(&lf); in SkScalerContext_Windows()
958 … w=%d, h=%d, font:%s,fh:%d\n", glyph.fID, glyph.fWidth, glyph.fHeight, lf.lfFaceName, lf.lfHeight); in generatePath()
1047 LOGFONT lf; in GetAdvancedTypefaceMetrics() local
1048 GetLogFontByID(fontID, &lf); in GetAdvancedTypefaceMetrics()
1052 HFONT font = CreateFontIndirect(&lf); in GetAdvancedTypefaceMetrics()
1068 if (!otmRet || !GetTextFace(hdc, LF_FACESIZE, lf.lfFaceName)) { in GetAdvancedTypefaceMetrics()
1071 lf.lfHeight = -SkToS32(otm.otmEMSquare); in GetAdvancedTypefaceMetrics()
1072 designFont = CreateFontIndirect(&lf); in GetAdvancedTypefaceMetrics()
1086 size_t str_len = WideCharToMultiByte(CP_UTF8, 0, lf.lfFaceName, -1, NULL, in GetAdvancedTypefaceMetrics()
1091 WideCharToMultiByte(CP_UTF8, 0, lf.lfFaceName, -1, familyName, str_len, in GetAdvancedTypefaceMetrics()
1096 info->fFontName.set(lf.lfFaceName); in GetAdvancedTypefaceMetrics()
1200 LOGFONT lf; in OpenStream() local
1201 GetLogFontByID(uniqueID, &lf); in OpenStream()
1204 HFONT font = CreateFontIndirect(&lf); in OpenStream()
1251 LOGFONT lf; in CreateTypeface() local
1253 lf = get_default_font(); in CreateTypeface()
1256 lf = face->fLogFont; in CreateTypeface()
1258 memset(&lf, 0, sizeof(LOGFONT)); in CreateTypeface()
1269 ::wcsncpy(lf.lfFaceName, wideFamilyName, LF_FACESIZE); in CreateTypeface()
1272 ::strncpy(lf.lfFaceName, familyName, LF_FACESIZE); in CreateTypeface()
1274 lf.lfFaceName[LF_FACESIZE-1] = '\0'; in CreateTypeface()
1276 setStyle(&lf, style); in CreateTypeface()
1277 return SkCreateTypefaceFromLOGFONT(lf); in CreateTypeface()