Home | History | Annotate | Download | only in ports

Lines Matching refs:lf

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