[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Does underline, bold ... features work??
From: tuan ####@####.#### Date: 6 Sep 2000 18:01:13 -0000 Message-Id: <39B68A48.7DF948F2@topiaventures.com> Hi, Am I missing something here? or the features are simply not there yet? Text come out almost the same. Underline work, but no different from the rest of the features such as weight. Italic ... Tuan GdSetForeground(red); GdSetUseBackground(TRUE); GdSetBackground(yellow); PMWFONT pfont, pfont1, pfont2; PMWLOGFONT plogfont, plogfont1; PMWLOGFONT plogfont2; //not know how to use yet plogfont->lfSmallCaps = 1; plogfont->lfOblique = 1; plogfont->lfWeight = 900; plogfont->lfOutPrecision = 0; plogfont->lfUnderline = 1; pfont = GdCreateFont(psd, NULL, NULL, plogfont); GdSetFontSize(pfont, 26); GdSetFont(pfont); //GdSetFontRotation(pfont, 10); GdText(psd,50,60,"What is this",12,1); GdDestroyFont(pfont); ////////// plogfont1->lfSmallCaps = 0; plogfont1->lfOblique = 0; plogfont1->lfWeight = 100; plogfont1->lfOutPrecision = 0; plogfont1->lfUnderline = 0; plogfont1->lfItalic = 1; pfont1 = GdCreateFont(psd, NULL, NULL, plogfont1); GdSetFontSize(pfont1, 26); //GdSetFontRotation(pfont1, 300); GdSetFont(pfont1); GdText(psd,50,80,"What is this",12,1); GdDestroyFont(pfont1); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: Does underline, bold ... features work??
From: "Greg Haerr" ####@####.#### Date: 7 Sep 2000 16:14:09 -0000 Message-Id: <023201c018e6$baee54a0$15320cd0@gregh> : Am I missing something here? or the features are simply not there yet? : Text come out almost the same. Underline work, but no different from the : rest of the features such as weight. Italic ... Microwindows doesn't create new fonts, except for when underline is asked for. Otherwise, it maps your request into an available truetype or adobe type 1 font. Currently, the fontmapping code is deselected. To turn it on, #define FONTMAPPER in src/include/device.h, which will include the complicated code that Morten submitted. This code looks at a nano-X.cfg file (currently only supporting adobe type 1 fonts) and then compares those attributes with your MWLOGFONT attributes, and selects one of the fonts. I think it's too complicated for the average user, and plan to rewrite it. (actually, it's setup now so that anyone can have their own font mapper, so I'll really just be writing an additional one) To select different fonts now, pass the pathname of the desired font directly into the second param of GdCreateFont, with the size requested in the third param, and leave the PMLOGFONT NULL. Regards, Greg : : Tuan : : GdSetForeground(red); : GdSetUseBackground(TRUE); : GdSetBackground(yellow); : PMWFONT pfont, pfont1, pfont2; : PMWLOGFONT plogfont, plogfont1; : PMWLOGFONT plogfont2; : file://not know how to use yet : plogfont->lfSmallCaps = 1; : plogfont->lfOblique = 1; : plogfont->lfWeight = 900; : plogfont->lfOutPrecision = 0; : plogfont->lfUnderline = 1; : : pfont = GdCreateFont(psd, NULL, NULL, plogfont); : : GdSetFontSize(pfont, 26); : GdSetFont(pfont); : file://GdSetFontRotation(pfont, 10); : GdText(psd,50,60,"What is this",12,1); : GdDestroyFont(pfont); : : : ////////// : plogfont1->lfSmallCaps = 0; : plogfont1->lfOblique = 0; : plogfont1->lfWeight = 100; : plogfont1->lfOutPrecision = 0; : plogfont1->lfUnderline = 0; : plogfont1->lfItalic = 1; : : pfont1 = GdCreateFont(psd, NULL, NULL, plogfont1); : : GdSetFontSize(pfont1, 26); : file://GdSetFontRotation(pfont1, 300); : GdSetFont(pfont1); : GdText(psd,50,80,"What is this",12,1); : GdDestroyFont(pfont1); : : --------------------------------------------------------------------- : To unsubscribe, e-mail: ####@####.#### : For additional commands, e-mail: ####@####.#### : : | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |