Simple way to enter text to the screen

I’d just like to know what’s the simplist way I can write text to the
screen from user input.

Also, is it just me or is the openprojects.net IRC sever down? I can’t
connect to it.

Thanks,
Derek

SFont (or at least SOFont; the C++ version) can do it. DFont and
others might as well.

It kinda’ makes sense to put it in a font lib, as it’s rather simple
stuff, while dependent on the font lib. (Well, you could implement
it with an open interface for the font rendering, I suppose…)

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Saturday 24 May 2003 16.35, Derek Arndt wrote:

I’d just like to know what’s the simplist way I can write text to
the screen from user input.

the irc channel is now on irc.freenode.net

somebody PLEASE update the web page!> ----- Original Message -----

From: deekpyro@charter.net (Derek Arndt)
To:
Sent: Saturday, May 24, 2003 7:35 AM
Subject: [SDL] Simple way to enter text to the screen

I’d just like to know what’s the simplist way I can write text to the
screen from user input.

Also, is it just me or is the openprojects.net IRC sever down? I can’t
connect to it.

Thanks,
Derek


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Helo Derek.

I dont know if this is EXACTLY what you need, but following this tutorial,
it tells how to “print” text on the screen, basically, using a “font bit
map”. Like an image that has allll the fonts you need. And you just blit the
"places" of that image (corresponding to the character that you want), on
the screen.

I think this is a good solution, and also, you can make good fonts by your
self, with the color, design, etc. that u like.

Here is the url:
http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/tut4

** Also, theres some other cool tutorials there. **

I hope that this can help you.

bye!

PD: As far as i know (not even far :P), its like imposible to send normal
text, like with
cout <<“lalala”; or printf(“lalala”);
I have been searching on google groups-search, and just find two persons
asking about, but finding no solution.

                                               Eduardo Garcia Rajo (h)------------------------------------------------------------------

Visite: http://www.solucion-digital.com.ar
SOLUCION DIGITAL
Redes - Software - Servicios

----- Original Message -----
From: deekpyro@charter.net (Derek Arndt)
To:
Sent: Saturday, May 24, 2003 11:35 AM
Subject: [SDL] Simple way to enter text to the screen

I’d just like to know what’s the simplist way I can write text to the
screen from user input.

Also, is it just me or is the openprojects.net IRC sever down? I can’t
connect to it.

Thanks,
Derek


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

PD: As far as i know (not even far :P), its like imposible to send normal
text, like with
cout <<“lalala”; or printf(“lalala”);

Not really true… You could have, for example, a “screen” object with
the operator << redefined. That way, you could perfectly have something
like:

screen << “lalala”;

It should also be possible to redirect stdout so that it’s displayed to
the screen, but it’s not as easy and I don’t think it’s a good idea
anyway. If you really want to redirect stdout “to the screen”, I guess
(never actually done it and haven’t thought much about it) you’d have in
fact to redirect it to a memory buffer and then regulary poll that
buffer to see if it contains something new and display the content of
that buffer with your favourite “graphical text” display routine or a
lib like SFont/SOFont.

I have been searching on google groups-search, and just find two persons
asking about, but finding no solution.

Hope it helps,
-Gaetan.On Sat, 2003-05-24 at 17:46, eDU! wrote:

I agree with Gaetan. The best you have to do is to find a bitmap with fonts
( ‘A’,‘B’…), and to define your own routine to draw this fonts ( like it
was some sprites). For this, you have to decompose the buffer, letter by
letter. I know it is fastidious…> ----- Original Message -----

From: ged@bugfactory.org (Gaetan de Menten)
To: “SDL list”
Sent: Saturday, May 24, 2003 6:57 PM
Subject: RE: [SDL] Simple way to enter text to the screen

On Sat, 2003-05-24 at 17:46, eDU! wrote:

PD: As far as i know (not even far :P), its like imposible to send
normal

text, like with
cout <<“lalala”; or printf(“lalala”);

Not really true… You could have, for example, a “screen” object with
the operator << redefined. That way, you could perfectly have something
like:

screen << “lalala”;

It should also be possible to redirect stdout so that it’s displayed to
the screen, but it’s not as easy and I don’t think it’s a good idea
anyway. If you really want to redirect stdout “to the screen”, I guess
(never actually done it and haven’t thought much about it) you’d have in
fact to redirect it to a memory buffer and then regulary poll that
buffer to see if it contains something new and display the content of
that buffer with your favourite “graphical text” display routine or a
lib like SFont/SOFont.

I have been searching on google groups-search, and just find two persons
asking about, but finding no solution.

Hope it helps,
-Gaetan.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl