www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/12/10:29:08

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: HLP: Big Fonts (Allegro)
Date: Sat, 12 Apr 1997 12:59:34 +0100
Organization: None
Distribution: world
Message-ID: <7JndVOAmk3TzEwaY@talula.demon.co.uk>
References: <19970408194421380 DOT AAA195 AT ns1 DOT megsinet DOT net>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 25
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Paul Schmidt writes:
>How do you display fonts that are bigger than the 8x8 ROM set?

Look at examples/ex12.c. You want something along the lines of:

  DATAFILE *datafile = load_datafile("myfont.dat");
  textout(screen, datafile[BIG_FONT].dat, "Hello!", xpos, ypos, color);

If you don't like having to distribute the datafile along with your
program, use dat2s to convert it into code that can be linked directly
into your executable.

>If you want to see my program (I tried to use the font in example.dat in the
>\allegro\examples directory, but I couldn't get it to work right (I didn't
>like it too much either, but if I can get it to work, it'll do.) you can

There are lots of fonts in the LIBGRX distribution, which you can get
from the SimTel djgpp archives. Alternatively, on my web page there is a
program called TTF2PCX, that converts Windows TrueType fonts into PCX
files that can be read by Allegro.


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019