Mail Archives: djgpp/1999/08/31/19:57:03
My bum is on the swedish.
Klaas <klaas1 AT ns DOT sympatico DOT ca> wrote in message
news:37CB4E6F DOT 525C AT ns DOT sympatico DOT ca...
> Erik Ellingsson wrote:
> >
> > Hello!
> >
> > We are two swedish boys, we are currently working with a project using
> > DJGPP and ALLEGRO. Because -we are swedish we want to use ASCII
> > characters in the function textout( ); The characters are between the
> > value 128-255. Is this possible using ALLEGRO? and if it is possible
> > how are we going to do this? Do we have to alter the keyboard
> > settings/file or something like that?
>
> 1. Set your font to include whatever characters you need.
> 2. Use chars in the string to display those characters.
>
> For example:
> Say I created a font with "ņ" in ANSI (not ASCII) #149.
>
> To display this in Allegro:
>
> textprintf(mybmp,myfont,myx,myy,mycolor,"oo%coo",149); /* this will
> display "ooņoo" */
It's even simpler if you edit your programs in Notepad or
any other Windows text editor, as opposed to RHIDE.
It seems that the default font and any fonts created with
TTF2PCX use the Windows (ANSI) character set rather
than the DOS (OEM) character set for its ANSI characters.
To say the lyrics to an annoying song, simply do this:
textout(screen, font, "Dale a tu cuerpo alegrķa Macarena", 80, 100, 15);
-Damian
- Raw text -