Changeset 1394 for trunk/dll/fonts.c
- Timestamp:
- Feb 5, 2009, 5:17:25 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/fonts.c
r1391 r1394 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2008 Steven H. Levine9 Copyright (c) 2008, 2009 Steven H. Levine 10 10 11 11 05 Jan 08 SHL Sync … … 76 76 77 77 VOID SetPresParamFromFattrs(HWND hwnd, FATTRS * fattrs, 78 78 SHORT sNominalPointSize, FIXED fxPointSize) 79 79 { 80 80 … … 87 87 if ((((USHORT) FIXEDFRAC(fxPointSize) * 100) / 65536) > 0) 88 88 sprintf(&s[strlen(s)], "%hd.", 89 89 ((USHORT) FIXEDFRAC(fxPointSize) * 100) / 65536); 90 90 } 91 91 strcat(s, fattrs->szFacename); … … 125 125 //DosEnterCritSec(); //GKY 11-30-08 126 126 DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT); 127 szPreview = GetPString(IDS_BLURB1TEXT); 127 szPreview = GetPString(IDS_BLURB1TEXT + counter++); 128 if (strcmp(szPreview, "0") == 0) { 129 counter = 0; 130 szPreview = GetPString(IDS_BLURB1TEXT + counter++); 131 } 128 132 DosReleaseMutexSem(hmtxFM2Globals); 129 133 //DosExitCritSec(); … … 157 161 WinReleasePS(fontdlg.hpsScreen); 158 162 SetPresParamFromFattrs(hwnd, &fontdlg.fAttrs, fontdlg.sNominalPointSize, 159 163 fontdlg.fxPointSize); 160 164 } 161 165 #endif … … 177 181 HPS hps; 178 182 FONTMETRICS fontMetrics; 179 CHAR szFamily[CCHMAXPATH], *szPreview; 183 CHAR szFamily[CCHMAXPATH]; 184 PCSZ pcszPreview; 180 185 static FIXED fxPointSize = 0; /* keep track of this for vector fonts */ 181 186 … … 184 189 //DosEnterCritSec(); //GKY 11-30-08 185 190 DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT); 186 szPreview = GetPString(IDS_BLURB1TEXT); 191 // 12 Jan 09 SHL fixme to do multiple previews or rename to IDS_BLURBTEXT 192 pcszPreview = GetPString(IDS_BLURB1TEXT); 187 193 DosReleaseMutexSem(hmtxFM2Globals); 188 194 //DosExitCritSec(); … … 194 200 if (!(flags & 1)) 195 201 WinSendMsg(hwndMLE, MLM_QUERYFONT, 196 202 MPFROMP((PFATTRS) & (fontDlg.fAttrs)), NULL); 197 203 else 198 204 memcpy(&fontDlg.fAttrs, fattrs, sizeof(FATTRS)); … … 201 207 202 208 GpiCreateLogFont(hps, (PSTR8) fontDlg.fAttrs.szFacename, 1, 203 209 &(fontDlg.fAttrs)); 204 210 GpiSetCharSet(hps, 1); 205 211 GpiQueryFontMetrics(hps, sizeof(FONTMETRICS), &fontMetrics); … … 215 221 fontDlg.hpsPrinter = NULLHANDLE; /* Printer presentation space */ 216 222 217 fontDlg.pszTitle = GetPString(IDS_SETVIEWERFONTTITLETEXT);218 fontDlg.pszPreview = szPreview;223 fontDlg.pszTitle = (PSZ)GetPString(IDS_SETVIEWERFONTTITLETEXT); 224 fontDlg.pszPreview = (PSZ)pcszPreview; 219 225 fontDlg.pszPtSizeList = NULL; /* Application provided size list */ 220 226 fontDlg.pfnDlgProc = NULL; /* Dialog subclass procedure */
Note:
See TracChangeset
for help on using the changeset viewer.