Skip to content

Commit 0bbf943

Browse files
rouaultgithub-actions[bot]
authored andcommitted
msGetGlyphByIndex() / msGetGlyphOutline(): tweak debug/error messages
1 parent cf4756e commit 0bbf943

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fontcache.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,13 +288,13 @@ glyph_element* msGetGlyphByIndex(face_element *face, unsigned int size, unsigned
288288
}
289289
error = FT_Load_Glyph(face->face,key.codepoint,FT_LOAD_DEFAULT|FT_LOAD_NO_BITMAP|FT_LOAD_NO_HINTING|FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH);
290290
if (error) {
291-
msDebug("Unable to load glyph %ud for font \"%s\". Using ? as fallback.", key.codepoint, face->font);
291+
msDebug("Unable to load glyph %u for font \"%s\". Using ? as fallback.\n", key.codepoint, face->font);
292292
// If we can't find a glyph then try to fallback to a question mark.
293293
unsigned int fallbackCodepoint = msGetGlyphIndex(face, 0x3F);
294294
error = FT_Load_Glyph(face->face,fallbackCodepoint,FT_LOAD_DEFAULT|FT_LOAD_NO_BITMAP|FT_LOAD_NO_HINTING|FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH);
295295
}
296296
if(error) {
297-
msSetError(MS_MISCERR, "unable to load glyph %ud for font \"%s\"", "msGetGlyphByIndex()",key.codepoint, face->font);
297+
msSetError(MS_MISCERR, "unable to load glyph %u for font \"%s\"", "msGetGlyphByIndex()",key.codepoint, face->font);
298298
free(gc);
299299
#ifdef USE_THREAD
300300
if (use_global_ft_cache)
@@ -342,13 +342,13 @@ outline_element* msGetGlyphOutline(face_element *face, glyph_element *glyph) {
342342
FT_Set_Transform(face->face, &matrix, &pen);
343343
error = FT_Load_Glyph(face->face,glyph->key.codepoint,FT_LOAD_DEFAULT|FT_LOAD_NO_BITMAP/*|FT_LOAD_IGNORE_TRANSFORM*/|FT_LOAD_NO_HINTING|FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH);
344344
if (error) {
345-
msDebug("Unable to load glyph %ud for font \"%s\". Using ? as fallback.", glyph->key.codepoint, face->font);
345+
msDebug("Unable to load glyph %u for font \"%s\". Using ? as fallback.\n", glyph->key.codepoint, face->font);
346346
// If we can't find a glyph then try to fallback to a question mark.
347347
unsigned int fallbackCodepoint = msGetGlyphIndex(face, 0x3F);
348348
error = FT_Load_Glyph(face->face,fallbackCodepoint,FT_LOAD_DEFAULT|FT_LOAD_NO_BITMAP/*|FT_LOAD_IGNORE_TRANSFORM*/|FT_LOAD_NO_HINTING|FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH);
349349
}
350350
if(error) {
351-
msSetError(MS_MISCERR, "unable to load glyph %ud for font \"%s\"", "msGetGlyphOutline()",glyph->key.codepoint, face->font);
351+
msSetError(MS_MISCERR, "unable to load glyph %u for font \"%s\"", "msGetGlyphOutline()",glyph->key.codepoint, face->font);
352352
#ifdef USE_THREAD
353353
if (use_global_ft_cache)
354354
msReleaseLock(TLOCK_TTF);

0 commit comments

Comments
 (0)