Write formatted text

Hi!

Is there some LGPL-library to put out formatted text?
E.g. some RTF to SDL_Surface “converter”?

In my app I have to show lots of “infocards” which
contain picture and text information about specific topics.

I would like to store the text (multiline) of every infocard in
a separate text file, load it on demand, and show it inside
a “text field” with specific position, width, and height.

thx,
Thomas

Hello Thomas,

Monday, January 13, 2003, 6:16:47 PM, you wrote:

TE> Is there some LGPL-library to put out formatted text?
TE> E.g. some RTF to SDL_Surface “converter”?

TE> In my app I have to show lots of “infocards” which
TE> contain picture and text information about specific topics.

TE> I would like to store the text (multiline) of every infocard in
TE> a separate text file, load it on demand, and show it inside
TE> a “text field” with specific position, width, and height.

Ehm, that doesn’t have to do anything with SDL.
You need to do that yourself. Open a file with text, split it in X
byte chunks searching for line breaks. Use bfont/sdl_ttf and show
that stuff on the screen.

I think SDL_ttf is the thing you are searching for.–
Lynx,
http://dotNet.lv mailto:@Anatoly_R

Thanks for your note Anatoly!

Yes, I know and I am using SDL_ttf.

But I do not want to write my own RTF/HTML etc. parser
up to now. I am just hoping maybe someone else had to
do and would provide this.

I just thought it would be related to SDL e.g. like JPG
is related to SDL (> SDL_Image).

Maybe I will use another tool to automatically create static
bitmaps out of my formatted(rtf/html)-text files. But as this
would be at least a waste of disc space, I am even not sure if I
would have enough place on the end product CD for all this data.

thx,
Thomas> ----- Original Message -----

From: emulynx@delfi.lv (Anatoly R.)
To: “Thomas Eder”
Sent: Monday, January 13, 2003 5:49 PM
Subject: Re: [SDL] write formatted text

Hello Thomas,

Monday, January 13, 2003, 6:16:47 PM, you wrote:

TE> Is there some LGPL-library to put out formatted text?
TE> E.g. some RTF to SDL_Surface “converter”?

TE> In my app I have to show lots of “infocards” which
TE> contain picture and text information about specific topics.

TE> I would like to store the text (multiline) of every infocard in
TE> a separate text file, load it on demand, and show it inside
TE> a “text field” with specific position, width, and height.

Ehm, that doesn’t have to do anything with SDL.
You need to do that yourself. Open a file with text, split it in X
byte chunks searching for line breaks. Use bfont/sdl_ttf and show
that stuff on the screen.

I think SDL_ttf is the thing you are searching for.


Lynx,
http://dotNet.lv mailto:emulynx at delfi.lv


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

Hello Thomas,

Monday, January 13, 2003, 8:09:07 PM, you wrote:

TE> But I do not want to write my own RTF/HTML etc. parser
TE> up to now. I am just hoping maybe someone else had to
TE> do and would provide this.

TE> I just thought it would be related to SDL e.g. like JPG
is related to SDL (>> SDL_Image).

SDL_Gekko anyone :wink: ?–
Lynx,
http://dotNet.lv mailto:@Anatoly_R

Hi!

Is there some LGPL-library to put out formatted text?
E.g. some RTF to SDL_Surface “converter”?

I just wrote a simple one:
http://www.libsdl.org/cvs/SDL_rtf-0.0.1.tar.gz

It’s really rough, but it might be helpful for you.

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment