Re: Bedstead font

Richard Russell
 

On Mon, Feb 12, 2018 at 06:27 am, J.G.Harston wrote:
Thirteen characters disappear off the right side of the screen,
Traditional teletext displays (i.e. on TV sets) have an aspect ratio much closer to 1:1 than the 4:3 aspect ratio of MODE 7, therefore the characters in the Bedstead font are also narrower: 12 pixels rather than the 16 pixels expected by MODE 7.  That means that about 53 characters rather than the usual 40 'fit' across the width of the screen; you can see this directly if you select MODE 6 rather than MODE 7.

In MODE 7 the character positioning is not determined by the character width (it is fixed at 40 characters per line) but the automatic end-of-line wrapping still is, which is why 13 characters are 'missing'.  One solution is to use the 'Bedstead-ext' font, which has the wanted 16-pixel width; had you checked the fonts supplied with BBCSDL you would have found that 'Bedstead-ext.otf' is included but 'Bedstead.otf' isn't.

Another solution is to force the character width to 16 pixels, overriding the value in the font file itself.  Generally you have to force the height anyway, in BB4W, because of the DPI issue (the font size is set in 'points' and the relationship between 'points' and 'pixels' depends on the DPI).  This code does both:

      MODE 7
      @vdu%!220 = -20 : REM Force character height to 20 pixels
      *FONT Bedstead
      @vdu%!216 = 16  : REM Force character width to 16 pixels

      PRINT ''''''

      FOR A=32 TO 126:VDU A:NEXT A:PRINT
      FOR A=0 TO 24:PRINT TAB(A,A);CHR$(129+(A MOD 7));"line ";A;CHR$135;:NEXT A

Richard.

Join bb4w@groups.io to automatically receive all group messages.