selecting_20a_20font_20by_20pixel_20height
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
selecting_20a_20font_20by_20pixel_20height [2018/04/17 13:52] – Tidied up formatting richardrussell | selecting_20a_20font_20by_20pixel_20height [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
//by Richard Russell, July 2007//\\ \\ The BBC BASIC for Windows [[http:// | //by Richard Russell, July 2007//\\ \\ The BBC BASIC for Windows [[http:// | ||
+ | <code bb4w> | ||
@vdu%!220 = PixelHeight% | @vdu%!220 = PixelHeight% | ||
*FONT FaceName | *FONT FaceName | ||
+ | </ | ||
Note particularly that **no size** is specified in the *FONT command. So for example if you wanted to select the Arial font with a height of 40 pixels you could do that as follows: | Note particularly that **no size** is specified in the *FONT command. So for example if you wanted to select the Arial font with a height of 40 pixels you could do that as follows: | ||
+ | <code bb4w> | ||
@vdu%!220 = 40 | @vdu%!220 = 40 | ||
*FONT Arial | *FONT Arial | ||
+ | </ | ||
This sets the height of the character **cell**. You can alternatively set the height of the character itself (i.e. excluding the //internal leading//) by specifying a negative value: | This sets the height of the character **cell**. You can alternatively set the height of the character itself (i.e. excluding the //internal leading//) by specifying a negative value: | ||
+ | <code bb4w> | ||
@vdu%!220 = -40 | @vdu%!220 = -40 | ||
*FONT Arial | *FONT Arial | ||
+ | </ | ||
---- | ---- | ||
**BBC BASIC for Windows version 6 only**:\\ \\ You can optionally specify a style such as **bold**, //italic// or __underlined__ as follows: | **BBC BASIC for Windows version 6 only**:\\ \\ You can optionally specify a style such as **bold**, //italic// or __underlined__ as follows: | ||
+ | <code bb4w> | ||
@vdu%!220 = 40 | @vdu%!220 = 40 | ||
*FONT Arial,B | *FONT Arial,B | ||
+ | </ | ||
You can also set the character' | You can also set the character' | ||
+ | <code bb4w> | ||
@vdu%!216 = -40 | @vdu%!216 = -40 | ||
@vdu%!220 = 40 | @vdu%!220 = 40 | ||
*FONT Arial | *FONT Arial | ||
+ | </ | ||
Note that you must specify the width as a negative value. | Note that you must specify the width as a negative value. |
selecting_20a_20font_20by_20pixel_20height.1523973161.txt.gz · Last modified: 2024/01/05 00:16 (external edit)