|
Default Allegro Font |
Felix-The-Ghost
Member #9,729
April 2008
|
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
Supreme Loser
January 1999
|
It's in src/font.c. |
Felix-The-Ghost
Member #9,729
April 2008
|
Matthew Leverton
Supreme Loser
January 1999
|
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"} 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"} -- |
Felix-The-Ghost
Member #9,729
April 2008
|
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) |
Surt
Member #273
April 2000
|
Or you could do as Matthew suggested and get results like this in a couple of minutes. --- |
Arthur Kalliokoski
Second in Command
February 2005
|
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. 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}
They all watch too much MSNBC... they get ideas. |
l j
Member #10,584
January 2009
|
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
|
That's why I specified using DOSBOX. They all watch too much MSNBC... they get ideas. |
amber
Member #6,783
January 2006
|
Does DJGPP work in DOSBOX? You could always try that. |
Arthur Kalliokoski
Second in Command
February 2005
|
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. They all watch too much MSNBC... they get ideas. |
|