Restored from previous forum. Originally posted by CONVERT.
I am coding my first Windows with gadgets...
I set 20 for the height of a line text, in the TextGadget command. On my Windows 98, it feels good.
But if an user changes the default font, and set a greater font, I do not know how to calculate the height of a line.
Similar question : how is it possible to know the size of the default font?
Thanks a lot if you can tell me something...
Jean.
Height of the font.
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by PB.
> how is it possible to know the size of the default font?
Use the procedure shown at this post, and if large fonts are in use,
just make your gadget heights a few pixels higher:
viewtopic.php?t=3801
> how is it possible to know the size of the default font?
Use the procedure shown at this post, and if large fonts are in use,
just make your gadget heights a few pixels higher:
viewtopic.php?t=3801
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by CONVERT.
For the moment, I use LoadFont(0, "Times New Roman", 10) to fix the height, at the beginning. It is going well too. I suppose that all Windows have this font...
Thank's a lot.
Thank you very much. I'll test it. It is always interesting to detect small or big font. Many softs don't do that.Originally posted by PB
> how is it possible to know the size of the default font?
Use the procedure shown at this post, and if large fonts are in use,
just make your gadget heights a few pixels higher:
viewtopic.php?t=3801
For the moment, I use LoadFont(0, "Times New Roman", 10) to fix the height, at the beginning. It is going well too. I suppose that all Windows have this font...
Thank's a lot.
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by tinman.
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
Fred explained in another topic recently that if Windows cannot find the font you ask for then it will replace it with one which has similar sizes, properties, etc. So even if the system does not have Times New Roman, it is probable that another font will be loaded in its place.Originally posted by CONVERT
Thank you very much. I'll test it. It is always interesting to detect small or big font. Many softs don't do that.Originally posted by PB
> how is it possible to know the size of the default font?
Use the procedure shown at this post, and if large fonts are in use,
just make your gadget heights a few pixels higher:
viewtopic.php?t=3801
For the moment, I use LoadFont(0, "Times New Roman", 10) to fix the height, at the beginning. It is going well too. I suppose that all Windows have this font...
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by MrVainSCL.
tinman is right...
fred told this in follwing posting..
viewtopic.php?t=2794
PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
tinman is right...
fred told this in follwing posting..
viewtopic.php?t=2794
PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten