LB Booster
« Fonts »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:20am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Fonts  (Read 302 times)
Monkfish
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 104
xx Fonts
« Thread started on: Jul 8th, 2015, 12:32pm »

I would just like to confirm the LBB equivalent of the following LB line:

print #main.gfx, "font Lucida_Console 8"

« Last Edit: Jul 8th, 2015, 1:22pm by Monkfish » User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Fonts
« Reply #1 on: Jul 8th, 2015, 1:58pm »

on Jul 8th, 2015, 12:32pm, Monkfish wrote:
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.
User IP Logged

Monkfish
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 104
xx Re: Fonts
« Reply #2 on: Jul 8th, 2015, 4:08pm »

Thank you Richard smiley
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls