custom screenfont used from 'print' instead of default one

General FreeBASIC programming questions.
nitrofurano
Posts: 57
Joined: Dec 08, 2010 14:55
Location: Portugal
Contact:

custom screenfont used from 'print' instead of default one

Postby nitrofurano » Jun 01, 2012 12:15

how can we create and use our custom tyefaces, screenfonts from 'print' command, instead of that default one? is that some kind of binary bitmap area allocation, or we should copy parts from a secondary screen with a screenfont sheet, get/put, drawing pixel by pixel, etc.?
counting_pine
Site Admin
Posts: 5893
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: custom screenfont used from 'print' instead of default o

Postby counting_pine » Jun 01, 2012 19:28

The Draw String statement accepts custom fonts, though they are a slightly complicated to use. Have a good read though the www.freebasic.net/wiki/KeyPgDrawString, especially the second example program which shows you an example.
Essentially all the characters of the font are kept in an image buffer, stored one after the other, with the bytes of the top line of the image used for storing the width of each character.
nitrofurano
Posts: 57
Joined: Dec 08, 2010 14:55
Location: Portugal
Contact:

Re: custom screenfont used from 'print' instead of default o

Postby nitrofurano » Jun 01, 2012 19:57

thanks! :)

Return to “General”

Who is online

Users browsing this forum: No registered users and 3 guests