09-18-2023, 11:57 PM
(This post was last modified: 09-18-2023, 11:58 PM by PhilOfPerth.)
Sorry to be a pain (again), but
I'm trying to come to grips with "Fonty" stuff, and am a bit (a lot) puzzled by the results of this code:
I would expect it to print a single, full line of X's. But it doesn't. I think it's to do with the font I've selected,
but I thought _PrintWidth considered that. Does it?
I'm trying to come to grips with "Fonty" stuff, and am a bit (a lot) puzzled by the results of this code:
Code: (Select All)
Screen _NewImage(1024, 820, 32) ' Screen Width is 1024 pixels
SetFont: f& = _LoadFont("C:\WINDOWS\fonts\courbd.ttf", 24, "monospace")
_Font f&
' width of "X" on current screen
CpL = _DesktopWidth \ _PrintWidth("X") ' chars per line on current screen
Print "Width of X is"; _PrintWidth("X"); ", and Chars per Line is"; CpL
Locate 10, 10
Print String$(CpL, "X");
Sleep
but I thought _PrintWidth considered that. Does it?
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.)
Please visit my Website at: http://oldendayskids.blogspot.com/
Please visit my Website at: http://oldendayskids.blogspot.com/