r=pedemonte, a=blizzard
Using sscanf to parse font causes problems with whitespace - use something else
This commit is contained in:
mkaply%us.ibm.com 2000-12-11 21:15:04 +00:00
parent 01c76373c3
commit 42e06f4c42

View File

@ -452,10 +452,19 @@ nsresult GetSysFontInfo(nsSystemAttrID anID, nsFont* aFont)
} // switch
int pointSize;
char szFacename[FACESIZE];
char *szFacename;
sscanf( szFontNameSize, "%d.%s", &pointSize, szFacename);
pointSize = atoi(szFontNameSize);
szFacename = strchr(szFontNameSize, '.');
szFacename++;
#ifdef OLDCODE
PRUnichar name[FACESIZE];
name[0] = 0;
MultiByteToWideChar(0, szFacename,
strlen(szFacename) + 1, name, sizeof(name)/sizeof(name[0]));
#endif
aFont->name.AssignWithConversion(szFacename);
// Do Style