Jump to content
  • Advertisement
Sign in to follow this  
mike44

FreeType example

Recommended Posts

Advertisement
2 hours ago, mike44 said:

Hi

I've compiled:

michael@michael-All-Series:~/CPP$ g++ example1.c -o ftypeexample -lfreetype -I/usr/include/freetype2

http://freetype.sourceforge.net/freetype2/docs/tutorial/example1.c

but try to run on Ubuntu like:

michael@michael-All-Series:~/CPP$ ./ftypeexample ./Ubuntu-B.ttf HELLO

returns nothing.

Thanks for help. Can i use that font in my small commercial app?

 

And you have the ttf at the same location than your binary ?

From the tutorial, errors are gotten, but not managed: manage them.

Also, debug your program to see where things get bad.

Share this post


Link to post
Share on other sites

Thanks, now I look at something different:

FontHandle FontMgr::loadFont(const char* inFontPath, const char * inStartMem, const char * inEndMem, unsigned int inSizePx, bool require_exact)
{

and get:

HelloWorld.cpp:83:12: error: expected primary-expression before ‘.’ token
 m.loadFont(./Ubuntu-B.ttf, 0, 100, 16, 0);

 

There are no explanations to the loadFont function. Would you have an idea on how to load the ubuntu.ttf?

Share this post


Link to post
Share on other sites
52 minutes ago, mike44 said:

(./Ubuntu-B.ttf

This probably needs to be a a string.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!