Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » Default Allegro Font

This thread is locked; no one can reply to it. rss feed Print
Default Allegro Font
Felix-The-Ghost
Member #9,729
April 2008
avatar

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?

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Matthew Leverton
Supreme Loser
January 1999
avatar

It's in src/font.c.

Felix-The-Ghost
Member #9,729
April 2008
avatar

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

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Matthew Leverton
Supreme Loser
January 1999
avatar

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.

Elias
Member #358
May 2000

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":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/a\/9a4fda9c9f943aac7dc080c252b33a42.png","w":256,"h":128,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/a\/9a4fda9c9f943aac7dc080c252b33a42"}olicga.png

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

--
"Either help out or stop whining" - Evert

Felix-The-Ghost
Member #9,729
April 2008
avatar

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)

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Surt
Member #273
April 2000
avatar

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

---
--
-

Arthur Kalliokoski
Second in Command
February 2005
avatar

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.

[EDIT]

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.

#SelectExpand
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}

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

― Robert A. Heinlein

taron 
Member #10,584
January 2009
avatar

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
Second in Command
February 2005
avatar

That's why I specified using DOSBOX.

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

― Robert A. Heinlein

amber
Member #6,783
January 2006
avatar

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

Arthur Kalliokoski
Second in Command
February 2005
avatar

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.

[EDIT]

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.

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

― Robert A. Heinlein

Go to: