2014-10-06 3 views
1

나는 Windows 및 FreeType2와 어려움을 겪고 있습니다. 나는 자습서를 다음 오전 다음은 예제 코드로 표시됩니다 :FreeType 글꼴 경로 Windows

FT_Library library; /* handle to library  */ 
    FT_Face  face;  /* handle to face object */ 


    error = FT_Init_FreeType(&library); 
    if (error) { ... } 

    error = FT_New_Face(library, "/usr/share/fonts/truetype/arial.ttf", 0, &face); // <-- this does not exist... 
    if (error == FT_Err_Unknown_File_Format) 
    { 
    ... the font file could be opened and read, but it appears 
    ... that its font format is unsupported 
    } 
    else if (error) 
    { 
    ... another error code means that the font file could not 
    ... be opened or read, or simply that it is broken... 
    } 

/usr/share/fonts/truetype/arial.ttf은 단지 존재하지 않는, 어떻게 내가 Arial 글꼴이 작업을 얻을 수 있습니다.

+0

물론 작동하지 않습니다.'/ usr /'는 Windows가 아닌 POSIX 스타일 경로입니다. – MSalters

+0

'c : \ windows \ fonts \'에서 찾을 수 있습니다 (우연히 하드 코드와 똑같이 잘못됩니다 : 시스템 API에서 경로를 얻어야합니다). 거기에 반영하는 Cygwin 설치? 그 대답은 그 길은 당신의 플랫폼에 맞지 않다고 생각합니다. 왜 FreeType이 필요한가요? Windows에서 Windows 글꼴 API를 사용할 수 없습니까? – Rup

+0

프로젝트에서 FreeType을 사용하기 때문에 경로가 필요합니다 (문서가 부족함). 그래서 나는 그 순간에 어둠 속에서 총을 쏜다! 고맙습니다! –

답변