他的函数说明是这样的
TTF_Font *TTF_OpenFont(const char *file, int ptsize)
file
File name to load font from.
ptsize
Point size (based on 72DPI) to load font as. This basically translates to pixel height.
Load file for use as a font, at ptsize size. This is actually TTF_OpenFontIndex(file, ptsize, 0). This can load TTF and FON files.
Returns: a pointer to the font as a TTF_Font. NULL is returned on errors.
比如:
[code:1]
TTF_Font *font;
font=TTF_OpenFont("font.ttf", 16);
[/code:1]
我到/usr/share/fonts/ 里找了几个ttf文件名
换到font.ttf的位置 都会出现Segmentation Fault
在google里竟然找不到有关TTF_OpenFont的中文内容
找到几个俄文网站 照抄网站上的源代码 还是Segmentation Fault