Default Allegro Font

Hey guys, I searched on the forums first but there were a lot of results about fonts in Allegro.

I'm looking for the font Allegro uses when there's no other font specified -- the pixel-ly one? Where would I find it? I wanted to be able to use it in Photoshop for graphics testing.

Or would that be weird with the set height?

Matthew Leverton

It's in src/font.c.


Is there a font file I can install to use in Photoshop?

Matthew Leverton

It's a hardcoded, fixed bitmap font. It wouldn't even scale.

Just search the Googlewebs for any old school fixed width font if you want an equivalent.


From what I remember it's actually just the 8x8 CGA ROM/BIOS font. Shawn simply ripped it from his computer. Google images seems to confirm:

BIOS font: {"name":"olicga.png","src":"\/\/\/image\/cache\/9\/a\/9a4fda9c9f943aac7dc080c252b33a42.png","w":256,"h":128,"tn":"\/\/\/image\/cache\/9\/a\/9a4fda9c9f943aac7dc080c252b33a42"}olicga.png

A4 font: {"name":"a4_font.png","src":"\/\/\/image\/cache\/2\/b\/2b18edf383ebca99589c900f3968c605.png","w":257,"h":321,"tn":"\/\/\/image\/cache\/2\/b\/2b18edf383ebca99589c900f3968c605"}a4_font.png


I don't care if it scales, I just wanted to be able to type something and get a picture of that. I guess maybe I could just write a program for that. Or continue just taking screenshots :/ I just thought it'd be cool to be able to type it directly where I was editing it (Photoshop)


Or you could do as Matthew suggested and get results like this in a couple of minutes.

Arthur Kalliokoski

I'd bet money you could grab your own computer BIOS font in a few minutes with a DOS compiler, DOSBOX and Ralf Brown's info on memory locations.


I'm gonna do that right now, time me for the revision time.

Aw, heck, I decided to use tcc and it wouldn't allow inline asm, and bc4 refused to run tlink so I gave up, anyway this should print it to the console, a redirect would work to save it to a file.

1#include <stdio.h> 2 3char font[8*256]; /* 8 bytes, the width is bits per byte */ 4 5int main(void) 6{ 7 int i,j,mask; 8 asm 9 { 10 mov ax,1130h 11 mov bh,3 12 int 10h 13 push ds 14 push es 15 push ds 16 push es 17 pop ds 18 pop es 19 mov di,offset font 20 mov si,bp 21 mov cx,256 22 rep movsb 23 pop es 24 pop ds 25 } 26 printf("\nint font8x8 {\n"); 27 for(i=0;i<256;i+=8) 28 { 29 for(j=0;j<8;j++) 30 { 31 int k; 32 k = i + j; 33 printf("%d, ",font[k]); 34 } 35 printf("\n"); 36 } 37 printf("\n};\n"); 38 return 0; 39}


I don't think you are allowed to call interrupts on most modern systems.

edit: Nevermind, just tried in debug. On windows it seems to work.

Arthur Kalliokoski

That's why I specified using DOSBOX.


Does DJGPP work in DOSBOX? You could always try that.

Arthur Kalliokoski

I didn't want to re-educate myself with mydosptr (?) and all that crap for a show off demo. I should have kept my mouth shut.

Maybe if I copy the bc4 stuff to a proper temporary directory and set the environment correctly it'd work. But I'm too lazy.


Well I tried it anyway, and the exe prints some stuff and hangs, then crashes DOSBOX.
I tried redirecting to a file, but it's just 0 bytes long. I gotta go visit somebody now.

Thread #608325. Printed from