0
我想畫上使用OpenGL的iPad.So我使用FreeType 2的庫加載字體files.Like一些文字如下:FreeType 2的無法打開的.ttf/.ttc字體文件
FT_New_Face(ft, "/System/Library/Fonts/Geneva.dfont", 0, &face)
編譯器不拋出任何錯誤打開文件,但是當我嘗試這樣做:
FT_New_Face(ft, "/System/Library/Fonts/HelveticaLight.ttf", 0, &face)
我得到的錯誤是:
"FT_Stream_Open: could not open `/System/Library/Fonts/HelveticaLight.ttf'
Could not open font"
我現在用的是FreeType 2的庫爲iOS從這裏:
https://github.com/cdave1/freetype2-ios
我已閱讀,Feetype 2支持TrueType字體,但我不知道爲什麼它是無法打開的.ttf/.ttc文件。
感謝
這可能聽起來很愚蠢,但你確定你打開的是在那裏嗎?這聽起來有點像I/O錯誤。另外,你確定編譯器報告錯誤嗎?它不應該在運行時出錯嗎? – 2012-01-20 10:05:58