Page 1 of 1

PostPosted: Wed Apr 25, 2001 7:45 am
by stef
Is there any way of controlling the fonts on controls created with 'createctrl' ?
'setfontattr' only seems to affect text drawn to the screen.
Alternatively, does anyone know a way of changing the default system font on a CE2.11
PalmPC ?


PostPosted: Wed Apr 25, 2001 10:41 am
by guy
PocketC lacks the programming interface to control the font used when drawing controls.

You can update the registry to change the details of the system font, I don't know whether you need a reboot to activate the change.

regwstr(2, "SYSTEM\\GDI\\SYSFNT", "Nm", "Tahoma") ; // Font name
regwint(2, "SYSTEM\\GDI\\SYSFNT", "Wt", 400) ; // Font weight
regwint(2, "SYSTEM\\GDI\\SYSFNT", "Ht", 14) ; // Font height
regwint(2, "SYSTEM\\GDI\\SYSFNT", "It", 0) ; // Italic flag


PostPosted: Thu Apr 26, 2001 7:12 am
by stef
Thanks Guy.
That worked fine for PocketC programs and some of the built in programs.
I can now get mixed Ukrainian/English text on the controls which was what I was after.
Outside PocketC, some apps use the new font and some don't. The only way I can find to force everything to use the new font is to replace 'Tahoma.ttf' and 'Cour.ttf' with copies of the new font !!!
The only problem to solve now is how to get the keyboard to display the new characters.
Any ideas anyone ?

PostPosted: Thu Apr 26, 2001 7:18 am
by guy

And possibly a very fine rolling ball pen.

For HPC devices there are more options: It may be possible to build a device with some MDF, some springs, a few wire coathangers and a sheet of bubble-wrap that fits snugly over the existing keyboard and is barely noticable to anyone who doesn't know that the device has been modified.

Time for my medication now...