For the Development Board to achieve the display vector font, like the PC, I need the font file, Here select simsun. TTC (New ).
1) initialize the database
Ft_init_freetype (& library);/* initialize library */
2) create face object
Ft_new_face (library, argv [1], 0, & face );
3) set the font size
Ft_set_pixel_sizes (face, 24, 0 );
4) Set coordinates
Pen. x = 0*64;
Pen. Y = (var. yres-24) * 64;
5) display them one by one
For (I = 0; I <wcslen (wstr1); I ++)
{
/* Set transformation */
Ft_set_transform (face, 0, & pen );
/* Load glyph image into the slot (erase previous one )*/
Ft_load_char (face, wstr1 [I], ft_load_render );
Draw_bitmap (& slot-> bitmap, slot-> bitmap_left, var. yres-Slot-> bitmap_top );
/* Increment pen position */
Pen. x + = slot-> advance. X;
}
Based on the above architecture, you can display a single line of text on the Development Board.
Display Vector Fonts ON THE DEVELOPMENT BOARD