font displaying suggestions?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
ruspa
Posts: 19
Joined: Thu Sep 13, 2007 11:17 pm
Location: Gorizia, ITALY

font displaying suggestions?

Post by ruspa »

After trying to use freetype and similar libs to displaying fonts in opengl, all failed because of the "ERROR: Install autoconf before continuing." under cygwin (I do have autoconf automake installed plus sources via the cygwin setup that shows you the packages already installed...I doublechecked many times and the shell still keeps saying "autoconf: command not found" .. mistery!) so I gave up and made a simple call in my code to

Code: Select all

int x,y=0;
        while &#40;x < 38&#41; &#123;
            while &#40;y < 64&#41; &#123;
                blitAlphaImageToScreen&#40;0 ,0 ,38 , 64, img_font1, x, y&#41;;
                y += 64;
            &#125;
            x += 32;
            y = 0;
        &#125;
        flipScreen&#40;&#41;;
(38 and 64 are the font monospaced size inside a font_grid.png I did)

where img_font1 is an Image* type with a png loaded in it the same way I load other textures in my program.

But fonts do not show up.. just my textured, filtered polygons: I inserted this piece of code in the gl draw cycle, so I suppose these functions are not compatible in some way (gl mode vs. no gl mode).
What do you suggest me to do to get through this? Making a set of mini-polygons each of them carrying one-font texture? (seems painful) or there's another call I can do different from blitAlphaImageToScreen to have this displayed in gl mode?
Thanks!

p.s. I do not have the text and fancytext examples in "samples" directory, just have a text sample which I cannot compile since it includes a "font.c" which I do not have.
KickinAezz
Posts: 328
Joined: Sun Jun 03, 2007 10:05 pm

Post by KickinAezz »

nvm
ruspa
Posts: 19
Joined: Thu Sep 13, 2007 11:17 pm
Location: Gorizia, ITALY

Post by ruspa »

nvm?
AllSystemGo
Posts: 26
Joined: Sat Jun 02, 2007 1:15 am

Post by AllSystemGo »

I guess he figured out his problem...
ruspa
Posts: 19
Joined: Thu Sep 13, 2007 11:17 pm
Location: Gorizia, ITALY

Post by ruspa »

is this some kind of joke? :\
quadrizo
Posts: 21
Joined: Thu Aug 23, 2007 10:21 pm

Post by quadrizo »

if you take a look to the function blitAlphaImageToScreen you'll see that it do a textured rectangle with ths gu engine... if you want that works with opengl you can do the same: make a textured rectangle with an ortho projection.

you can search the nehe tutorials ported to psp with the pspgl modified version, you'll found a fontEngine with List that works great
ruspa
Posts: 19
Joined: Thu Sep 13, 2007 11:17 pm
Location: Gorizia, ITALY

Post by ruspa »

thanks, this was crisp clear :D
Post Reply