- Timestamp:
- May 24, 2001, 9:26:31 PM (24 years ago)
- Location:
- trunk/src/gdi32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/font.cpp
r5585 r5795 1 /* $Id: font.cpp,v 1.1 8 2001-04-25 20:53:02sandervl Exp $ */1 /* $Id: font.cpp,v 1.19 2001-05-24 19:26:30 sandervl Exp $ */ 2 2 3 3 /* … … 164 164 HFONT hFont; 165 165 166 if(lpszFace == NULL) 167 lpszFace = ""; 168 169 if(strlen(lpszFace) >= LF_FACESIZE) 170 { 171 dprintf(("ERROR: Invalid string length for font name!!")); 172 SetLastError(ERROR_INVALID_PARAMETER); 173 return 0; 174 } 175 166 176 iFontRename(lpszFace, lpstrFaceNew); 167 177 168 178 dprintf(("lpszFace = %s -> %s\n", lpszFace, lpstrFaceNew)); 169 179 170 hFont = O32_CreateFont(nHeight, 171 nWidth, 172 nEscapement, 173 nOrientation, 174 fnWeight, 175 fdwItalic, 176 fdwUnderline, 177 fdwStrikeOut, 178 fdwCharSet, 179 fdwOutputPrecision, 180 fdwClipPrecision, 181 fdwQuality, 182 fdwPitchAndFamily, 183 lpszFace != NULL ? lpstrFaceNew : NULL); 184 return hFont; 180 LOGFONTA logFont = 181 { 182 nHeight, 183 nWidth, 184 nEscapement, 185 nOrientation, 186 fnWeight, 187 (BYTE)fdwItalic, 188 (BYTE)fdwUnderline, 189 (BYTE)fdwStrikeOut, 190 (BYTE)fdwCharSet, 191 (BYTE)fdwOutputPrecision, 192 (BYTE)fdwClipPrecision, 193 (BYTE)fdwQuality, 194 (BYTE)fdwPitchAndFamily 195 }; 196 strcpy(logFont.lfFaceName, lpszFace); 197 198 return CreateFontIndirectA(&logFont); 185 199 } 186 200 //****************************************************************************** -
trunk/src/gdi32/text.cpp
r5755 r5795 1 /* $Id: text.cpp,v 1.2 0 2001-05-19 13:50:19sandervl Exp $ */1 /* $Id: text.cpp,v 1.21 2001-05-24 19:26:31 sandervl Exp $ */ 2 2 3 3 /* … … 870 870 LPSIZE lpsSize) 871 871 { 872 #if 1 873 //SvL: This works better than the code below. Can been seen clearly 874 // in the Settings dialog box of VirtualPC. Strings are clipped. 875 // (e.g.: Hard Disk 1 -> Hard Disk) 876 return O32_GetTextExtentPoint(hdc, lpsz, cbString, lpsSize); 877 #else 872 878 BOOL rc; 873 879 POINTLOS2 pts[TXTBOXOS_COUNT]; … … 940 946 SetLastError(ERROR_SUCCESS); 941 947 return TRUE; 948 #endif 942 949 } 943 950 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.