LB Booster
Programming >> Liberty BASIC language >> Fonts http://lbb.conforums.com/index.cgi?board=lblang&action=display&num=1436358735 Fonts
Post by Monkfish on Jul 8th, 2015, 12:32pm
I would just like to confirm the LBB equivalent of the following LB line:
I would just like to confirm the LBB equivalent of the following LB line:
print #main.gfx, "font Lucida_Console 8"
The syntax of the font command is the same as in LB 4.04, so that statement is valid, but the resulting font may not always be identical to what it is in LB. One difference you may occasionally notice is that the font is slightly smaller in LBB; that is because it rounds down rather than to the nearest available size.
Specifically (at the standard 96 DPI setting) 8 points corresponds to 10.67 pixels, which LB 4.04 converts to 11 pixels but LBB converts to 10 pixels. The difference will never be more than 1 pixel, but when the font is very small that can be noticeable.
If the exact font size is important you can use the option of specifying the height directly in pixels rather than in points, which should give identical results in LB and LBB. For example:
Code:
#main.gfx "font Lucida_Console 0 11"
Bear in mind that when specifying the size in points the resulting font depends on the current DPI setting, whereas if you specify it in pixels it doesn't.
Richard. Re: Fonts
Post by Monkfish on Jul 8th, 2015, 4:08pm