IOQ3 commit 2231

This commit is contained in:
Richard Allen 2012-10-04 13:53:11 +00:00
parent 33defbaea3
commit 04a30e8dd8

View file

@ -363,7 +363,7 @@ void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font) {
R_SyncRenderThread();
if (registeredFontCount >= MAX_FONTS) {
ri.Printf(PRINT_ALL, "RE_RegisterFont: Too many fonts registered already.\n");
ri.Printf(PRINT_WARNING, "RE_RegisterFont: Too many fonts registered already.\n");
return;
}
@ -409,28 +409,28 @@ void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font) {
}
#ifndef BUILD_FREETYPE
ri.Printf(PRINT_ALL, "RE_RegisterFont: FreeType code not available\n");
ri.Printf(PRINT_WARNING, "RE_RegisterFont: FreeType code not available\n");
#else
if (ftLibrary == NULL) {
ri.Printf(PRINT_ALL, "RE_RegisterFont: FreeType not initialized.\n");
ri.Printf(PRINT_WARNING, "RE_RegisterFont: FreeType not initialized.\n");
return;
}
len = ri.FS_ReadFile(fontName, &faceData);
if (len <= 0) {
ri.Printf(PRINT_ALL, "RE_RegisterFont: Unable to read font file\n");
ri.Printf(PRINT_WARNING, "RE_RegisterFont: Unable to read font file '%s'\n", fontName);
return;
}
// allocate on the stack first in case we fail
if (FT_New_Memory_Face( ftLibrary, faceData, len, 0, &face )) {
ri.Printf(PRINT_ALL, "RE_RegisterFont: FreeType2, unable to allocate new face.\n");
ri.Printf(PRINT_WARNING, "RE_RegisterFont: FreeType, unable to allocate new face.\n");
return;
}
if (FT_Set_Char_Size( face, pointSize << 6, pointSize << 6, dpi, dpi)) {
ri.Printf(PRINT_ALL, "RE_RegisterFont: FreeType2, Unable to set face char size.\n");
ri.Printf(PRINT_WARNING, "RE_RegisterFont: FreeType, unable to set face char size.\n");
return;
}
@ -441,7 +441,7 @@ void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font) {
out = ri.Malloc(1024*1024);
if (out == NULL) {
ri.Printf(PRINT_ALL, "RE_RegisterFont: ri.Malloc failure during output image creation.\n");
ri.Printf(PRINT_WARNING, "RE_RegisterFont: ri.Malloc failure during output image creation.\n");
return;
}
Com_Memset(out, 0, 1024*1024);
@ -533,7 +533,7 @@ void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font) {
void R_InitFreeType(void) {
#ifdef BUILD_FREETYPE
if (FT_Init_FreeType( &ftLibrary )) {
ri.Printf(PRINT_ALL, "R_InitFreeType: Unable to initialize FreeType.\n");
ri.Printf(PRINT_WARNING, "R_InitFreeType: Unable to initialize FreeType.\n");
}
#endif
registeredFontCount = 0;