SDL_ttf - Looking for Fonts

Thanks for the recommendation to use SDL_ttf instead of BFont. SDL_ttf
looks like the right choice, especially since I want the font size and
color to be chosen at runtime. BFont only appears to be suitable if you’re
only using one font size, and even then SDL_ttf appears to be just as easy
to use.

I did discover that I could use GIMP to create my own BFont-compatible
font, but that seems to be too much work.

Now this raises another question: Where can I get free truetype fonts? I
tried looking on the freetype page and the SDL_ttf page, and couldn’t find
a link. I could use the ones that come bundled with Windows, but then I
wouldn’t be able to distribute them with my project.

Hi,

On Wed, 26 Mar 2003 22:29:53 -0600 Mark Krosky
wrote.
Thanks for the recommendation to use SDL_ttf instead of BFont. SDL_ttf
looks like the right choice, especially since I want the font size and
color to be chosen at runtime. BFont only appears to be suitable if you’re

only using one font size, and even then SDL_ttf appears to be just as easy
to use.

You should consider performance though. If you want to render dynamic
strings, like “score = 78”, SDL_ttf creates a new Surface on each call. So
at those times, BFont might suit better.

I did discover that I could use GIMP to create my own BFont-compatible
font, but that seems to be too much work.

You can check out my utility to create fonts for BFonts (uses SDL_ttf, so
it’s as flexible as you want):

http://www.libsdl.org/applications.php?order=name&category=any&completed=0&os=any&match_name=font&perpage=50

Now this raises another question: Where can I get free truetype fonts? I
tried looking on the freetype page and the SDL_ttf page, and couldn’t find
a link. I could use the ones that come bundled with Windows, but then I
wouldn’t be able to distribute them with my project.

http://www.fontfreak.com
http://www.1001freefonts.com/fonts.htm>


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

In developing Tux Paint, I’ve found a few GPL-compatible fonts:

…As well as a few needed for some of the languages Tux Paint supports.
(Japanese, Chinese, Korean, Greek.)

Good luck!

-bill!On Wed, Mar 26, 2003 at 10:29:53PM -0600, Mark Krosky wrote:

Now this raises another question: Where can I get free truetype fonts? I
tried looking on the freetype page and the SDL_ttf page, and couldn’t find
a link. I could use the ones that come bundled with Windows, but then I
wouldn’t be able to distribute them with my project.


bill at newbreedsoftware.com Hire me!
http://newbreedsoftware.com/bill/ http://newbreedsoftware.com/bill/resume/

Hi,

I could use the ones that come bundled with Windows, but then I
wouldn’t be able to distribute them with my project.

http://www.fontfreak.com
http://www.1001freefonts.com/fonts.htm

Be careful here, too. A lot of the fonts you find ‘for free’ on the web
still have ‘not for redistributions’ and ‘for personal use only’ kinds of
licenses (if you can find one at all! >:^( … most of the font sites I’ve
found seem almost like ‘warez’ sites, except the fact that the people who run
them (1) don’t think they’re “31337”, and (2) don’t realize they’re breaking
the rules by just throwing plain TTFs up, without any credits, documentation
or license material that the font authors required be included!)

-bill!On Wed, Mar 26, 2003 at 11:45:24PM -0800, patrick wrote:

On Wed, 26 Mar 2003 22:29:53 Mark Krosky wrote:


bill at newbreedsoftware.com Hire me!
http://newbreedsoftware.com/bill/ http://newbreedsoftware.com/bill/resume/

Hello everybody!

I’ve got a huge problem. I’m using SDL on my Mac PowerBook Ti with a
Radeon 16Mo and when I do a “SDL_GetVideoInfo()”, it says that I have
no hardware acceleration.

What’s the matter?

Here is the code:

========== ========== ==========
const char *windowName = “Tupper”;
int videoFlags = SDL_OPENGL;
//videoFlags |= SDL_RESIZABLE;

#ifdef VERBOSE
std::cout << “Initializing SDL…” << std::endl;
#endif

if( ( SDL_Init( SDL_INIT_VIDEO ) == -1 ) )
{
	std::cerr << "SDL initialization failed: " << SDL_GetError() << 

std::endl;
exit( 1 );
}

const SDL_VideoInfo *videoInfo = SDL_GetVideoInfo();
if( videoInfo == NULL )
{
	std::cerr << "Failed getting Video Info : " << SDL_GetError() << 

std::endl;
exit( 2 );
}

if( videoInfo->hw_available )
{
	videoFlags |= SDL_HWSURFACE;

#ifdef VERBOSE
std::cout << “Hardware acceleration detected” << std::endl;
#endif
}
else
{
videoFlags |= SDL_SWSURFACE;
#ifdef VERBOSE
std::cout << “No hardware acceleration, using software” << std::endl;
#endif
}

if( videoInfo->blit_hw )
	videoFlags |= SDL_HWACCEL;

#ifdef VERBOSE
std::cout << “Setting up SDL_GL attributes…” << std::endl;
#endif
========== ========== ==========

Thanks,
Mathieu Godart

Thanks for the recommendation to use SDL_ttf instead of BFont. SDL_ttf
looks like the right choice, especially since I want the font size and
color to be chosen at runtime. BFont only appears to be suitable if you’re
only using one font size, and even then SDL_ttf appears to be just as easy
to use.

I did discover that I could use GIMP to create my own BFont-compatible
font, but that seems to be too much work.

Now this raises another question: Where can I get free truetype fonts? I
tried looking on the freetype page and the SDL_ttf page, and couldn’t find
a link. I could use the ones that come bundled with Windows, but then I
wouldn’t be able to distribute them with my project.

The true type fonts distributed with XFree86 are released under a
license compatible with X and appear to be as free as any I have found.
The true type fonts distributed with OpenOffice are also freely
redistributable.

	Bob PendletonOn Wed, 2003-03-26 at 22:29, Mark Krosky wrote:

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

±----------------------------------+

  • Bob Pendleton: independent writer +
  • and programmer. +
  • email: Bob at Pendleton.com +
    ±----------------------------------+

Try:
http://www.google.com/search?q=fonts

I’ve found some of the Larabie fonts to be useful in the past (2nd result).On Wed, 26 Mar 2003 22:29:53 -0600 Mark Krosky wrote:

Thanks for the recommendation to use SDL_ttf instead of BFont. SDL_ttf
looks like the right choice, especially since I want the font size and
color to be chosen at runtime. BFont only appears to be suitable if you’re
only using one font size, and even then SDL_ttf appears to be just as easy
to use.

I did discover that I could use GIMP to create my own BFont-compatible
font, but that seems to be too much work.

Now this raises another question: Where can I get free truetype fonts? I
tried looking on the freetype page and the SDL_ttf page, and couldn’t find
a link. I could use the ones that come bundled with Windows, but then I
wouldn’t be able to distribute them with my project.


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

Try:
http://www.google.com/search?q=fonts

I’ve found some of the Larabie fonts to be useful in the past (2nd result).

Yes, I contacted him by email and got permission to use all of his fonts
in software. It doesn’t hurt to ask. :slight_smile:

	Bob PendletonOn Thu, 2003-03-27 at 16:38, Jude Venn wrote:

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

±----------------------------------+

  • Bob Pendleton: independent writer +
  • and programmer. +
  • email: Bob at Pendleton.com +
    ±----------------------------------+

patrick <patrick at 2dgame-tutorial.com> writes:

Hi,

On Wed, 26 Mar 2003 22:29:53 -0600 Mark Krosky
wrote.
You should consider performance though. If you want to render dynamic
strings, like “score = 78”, SDL_ttf creates a new Surface on each call. So
at those times, BFont might suit better.

[snip]

Now this raises another question: Where can I get free truetype fonts? I
tried looking on the freetype page and the SDL_ttf page, and couldn’t find
a link. I could use the ones that come bundled with Windows, but then I
wouldn’t be able to distribute them with my project.

Another benefit with using bitmapped fonts is that you don’t have any
problem with copyrights then - as far as I know, copyrights only apply
when you’re using the "raw’ font, not when you use pre-rendered
characters.–
[ Below is a random fortune, which is unrelated to the above message. ]
I’ll burn my books.
– Christopher Marlowe

It depends on the license of the font, though, doesn’t it?

:^/

-bill!On Fri, Mar 28, 2003 at 11:24:25AM -0800, David Hedbor wrote:

Another benefit with using bitmapped fonts is that you don’t have any
problem with copyrights then - as far as I know, copyrights only apply
when you’re using the "raw’ font, not when you use pre-rendered
characters.

Hi Mathieu,On Thursday 27 March 2003 15:44, Mathieu Godart wrote:

I’ve got a huge problem. I’m using SDL on my Mac PowerBook Ti with a
Radeon 16Mo and when I do a “SDL_GetVideoInfo()”, it says that I have
no hardware acceleration.

The hw flags in the video info struct does not contain any information about
OpenGL acceleration.

To set up an OpenGL window, use just SDL_OPENGL (SDL_RESIZABLE | SDL_NOFRAME)
See test/testgl.c

cu,
Johannes

Depends on which country you are in. I recently spent a couple of days
searching the web for references on this. IIRC, in the US the
instructions in a TTF font are protected by copyright, though the type
face may/or may not be. In some countries the font faces are protected.
It is best to make sure your fonts are licensed. You might get away with
distributing bit maps based on a copyright font in one country and then
get sued in another one.

	Bob PendletonOn Fri, 2003-03-28 at 13:24, David Hedbor wrote:

patrick <patrick at 2dgame-tutorial.com> writes:

Hi,

On Wed, 26 Mar 2003 22:29:53 -0600 Mark Krosky
wrote.
You should consider performance though. If you want to render dynamic
strings, like “score = 78”, SDL_ttf creates a new Surface on each call. So
at those times, BFont might suit better.

[snip]

Now this raises another question: Where can I get free truetype fonts? I
tried looking on the freetype page and the SDL_ttf page, and couldn’t find
a link. I could use the ones that come bundled with Windows, but then I
wouldn’t be able to distribute them with my project.

Another benefit with using bitmapped fonts is that you don’t have any
problem with copyrights then - as far as I know, copyrights only apply
when you’re using the "raw’ font, not when you use pre-rendered
characters.


±----------------------------------+

  • Bob Pendleton: independent writer +
  • and programmer. +
  • email: Bob at Pendleton.com +
    ±----------------------------------+

Mark Krosky wrote:

Where can I get free truetype fonts?

There’s a set of URW fonts floating about that’s been distributed with
Linux boxes for years. Your distro might include it, and if not, a
quick search for “urw-fonts” packages on sites like Freshmeat and
RPMFind should turn up the package.

Also, I’ve been told that the fonts that come with OpenOffice are free
to use for any purpose.

There’s also some kind of negotiation going on with Bitstream to open up
a set of fonts, but I don’t know how far negotiations have gotten at the
moment or where the find the fonts if negotiations have been successful.