What is the best process to change and use new fonts in my
application? I have the following, but it doesn't appear to change any of
the fonts in my forms when used. Any help is greatly appreciated.
--
CopyFontWidths(event->data.frmLoad.formID - frmMain);
void CopyFontWidths(int i)
{
int ch;
char *pch;
char *rgb;
if (i > largeBoldFont)
return;
FntSetFont(i);
rgb = MemPtrNew(3*256+1+128);
if (rgb == NULL)
return;
pch = rgb;
for (ch = 0; ch < 256; ch++)
{
SWord dx;
dx = FntCharWidth(ch);
StrIToA(pch, dx);
pch += StrLen(pch);
*pch++ = ',';
if ((ch+1)%8 == 0)
*pch++ = '\n';
}
*pch = 0;
ClipboardAddItem(clipboardText, rgb, pch-rgb);
MemPtrFree(rgb);
}