summaryrefslogtreecommitdiffstats
path: root/libass/ass_font.c
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2009-07-10 23:55:02 +0200
committerGrigori Goronzy <greg@blackbox>2009-07-11 00:03:56 +0200
commit613a22ab9b96453c10de6d75b43067652ad6d7db (patch)
tree76405fc5c113cb602f0778c85413fcb421aa127f /libass/ass_font.c
parent9305f3815442f8c0bd735e96832b7f72628bfcad (diff)
downloadlibass-613a22ab9b96453c10de6d75b43067652ad6d7db.tar.bz2
libass-613a22ab9b96453c10de6d75b43067652ad6d7db.tar.xz
Replace string defines with real strings
Instead of referencing string defines from help_mp.h, use the strings directly in ass_msg. Consequently, help_mp.h is useless and can be deleted.
Diffstat (limited to 'libass/ass_font.c')
-rw-r--r--libass/ass_font.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/libass/ass_font.c b/libass/ass_font.c
index 0aeeec6..76c4793 100644
--- a/libass/ass_font.c
+++ b/libass/ass_font.c
@@ -56,10 +56,10 @@ static void charmap_magic(FT_Face face)
if (!face->charmap) {
if (face->num_charmaps == 0) {
- ass_msg(MSGL_WARN, MSGTR_LIBASS_NoCharmaps);
+ ass_msg(MSGL_WARN, "Font face with no charmaps");
return;
}
- ass_msg(MSGL_WARN, MSGTR_LIBASS_NoCharmapAutodetected);
+ ass_msg(MSGL_WARN, "No charmap autodetected, trying the first one");
FT_Set_Charmap(face, face->charmaps[0]);
return;
}
@@ -140,16 +140,14 @@ static int add_face(void *fc_priv, ass_font_t *font, uint32_t ch)
font->library->fontdata[mem_idx].size, 0,
&face);
if (error) {
- ass_msg(MSGL_WARN, MSGTR_LIBASS_ErrorOpeningMemoryFont,
- path);
+ ass_msg(MSGL_WARN, "Error opening memory font: '%s'", path);
free(path);
return -1;
}
} else {
error = FT_New_Face(font->ftlibrary, path, index, &face);
if (error) {
- ass_msg(MSGL_WARN, MSGTR_LIBASS_ErrorOpeningFont, path,
- index);
+ ass_msg(MSGL_WARN, "Error opening font: '%s', %d", path, index);
free(path);
return -1;
}
@@ -387,16 +385,17 @@ FT_Glyph ass_font_get_glyph(void *fontconfig_priv, ass_font_t *font,
if (index == 0) {
int face_idx;
ass_msg(MSGL_INFO,
- MSGTR_LIBASS_GlyphNotFoundReselectingFont, ch,
- font->desc.family, font->desc.bold, font->desc.italic);
+ "Glyph 0x%X not found, selecting one more "
+ "font for (%s, %d, %d)", ch, font->desc.family,
+ font->desc.bold, font->desc.italic);
face_idx = add_face(fontconfig_priv, font, ch);
if (face_idx >= 0) {
face = font->faces[face_idx];
index = FT_Get_Char_Index(face, ch);
if (index == 0) {
- ass_msg(MSGL_ERR, MSGTR_LIBASS_GlyphNotFound,
- ch, font->desc.family, font->desc.bold,
- font->desc.italic);
+ ass_msg(MSGL_ERR, "Glyph 0x%X not found in font "
+ "for (%s, %d, %d)", ch, font->desc.family,
+ font->desc.bold, font->desc.italic);
}
}
}
@@ -419,7 +418,7 @@ FT_Glyph ass_font_get_glyph(void *fontconfig_priv, ass_font_t *font,
error = FT_Load_Glyph(face, index, FT_LOAD_NO_BITMAP | flags);
if (error) {
- ass_msg(MSGL_WARN, MSGTR_LIBASS_ErrorLoadingGlyph);
+ ass_msg(MSGL_WARN, "Error loading glyph, index %d", index);
return 0;
}
#if (FREETYPE_MAJOR > 2) || \
@@ -433,7 +432,7 @@ FT_Glyph ass_font_get_glyph(void *fontconfig_priv, ass_font_t *font,
#endif
error = FT_Get_Glyph(face->glyph, &glyph);
if (error) {
- ass_msg(MSGL_WARN, MSGTR_LIBASS_ErrorLoadingGlyph);
+ ass_msg(MSGL_WARN, "Error loading glyph, index %d", index);
return 0;
}