Ouch, looks like the attached file is too large. But it doesn't matters much.
Please help me with this issue, thanks a lot! On Sat, Nov 20, 2010 at 4:58 PM, Kelvin Chen <ryu...@gmail.com> wrote: > Hi, > > I couldn't create font for IDirectFB. The code I'm using is really simple, > but it fails. > Could anyone please give me some clue why it fails? I'm really appreciate > your help. > > The font file I used is attached. > > Thanks! > > #include <iostream> > #include <directfb.h> > using namespace std; > > int main(int argc, char *argv[]) > { > IDirectFB *dfb; > > // Initialize DirectFB > DirectFBInit(&argc, &argv); > DirectFBCreate(&dfb); > dfb->SetCooperativeLevel(dfb, DFSCL_FULLSCREEN); > > // Create fonts > IDirectFBFont *font = NULL; > // the font description where we will store the font height > DFBFontDescription fontDsc; > fontDsc.flags = DFDESC_HEIGHT; > fontDsc.height = 32; > // create the font > if(dfb->CreateFont(dfb, "FreeMono.ttf", &fontDsc, &font) != DFB_OK) { > cout << endl; > cout << "Create font failed!" << endl; > cout << endl; > return NULL; > } > } > > > -- > Kelvin Chen > -- Kelvin Chen
_______________________________________________ directfb-users mailing list directfb-users@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users