BMP and font

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
izidor
Veteran
Posts: 110
Joined: Wed Apr 22, 2009 3:13 am
Contact:

BMP and font

Post by izidor »

First how to open bmp in QBasic?

Second how to use fonts?
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

Open BMP files FOR BINARY. You have to get information from the bitmap header to find the BPP, offset, dimensions in the first 54 bytes.

The color settings and image are read with GET one byte at a time.

Use Paint and create bitmap fonts from Windows of 1 BPP (white on black background).
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
izidor
Veteran
Posts: 110
Joined: Wed Apr 22, 2009 3:13 am
Contact:

Post by izidor »

Maybe example, please.
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

Look in the downloads section here.

Or look at www.QbasicStation.com

Look in member Files there. I have several BMP programs there.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
izidor
Veteran
Posts: 110
Joined: Wed Apr 22, 2009 3:13 am
Contact:

Post by izidor »

Thanks for reply but do you know any font example.
Thanks

Izidor
User avatar
Kiyotewolf
Veteran
Posts: 96
Joined: Tue Apr 01, 2008 11:38 pm

font example

Post by Kiyotewolf »

To do fonts easily, dump an ascii table from a DOS window with the font set to what you want.

Then screen capture it, convert it to a BMP, then use the BMP decoding code to save the font data as bit patterns.

If you want to work with *.BMP's, I recommend only working with 24-bit BMP's.

There is a site that I know of that has all you need to work with *.BMP's.

]RUN SEARCH

]PRINT S;

http://www.mandelbrot-dazibao.com/Main/Main.htm

Lookie thar.. and you shall find.

My favorite fonts are 4x6, 8x8, and 8x16.



Kiyote!
Banana phone! We need more lemon pledge. * exploding fist of iced tea! * I see your psycho cat and counter with a duck that has a broken leg, in a cast.
izidor
Veteran
Posts: 110
Joined: Wed Apr 22, 2009 3:13 am
Contact:

Post by izidor »

Thanks!
Post Reply