summaryrefslogtreecommitdiff
path: root/font.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-06-23 11:28:18 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-06-23 11:28:18 +0200
commit24232a0010e086cb5a608ab1904de145d9aa95ba (patch)
treeb9a40089d6a4121f1a48b8353eb3756cf59f99a6 /font.c
parente5def7917b98bf488ddb0f369d5844008cfb4cb1 (diff)
downloadvdr-24232a0010e086cb5a608ab1904de145d9aa95ba.tar.gz
vdr-24232a0010e086cb5a608ab1904de145d9aa95ba.tar.bz2
Fixed stripping i18n stuff from font names
Diffstat (limited to 'font.c')
-rw-r--r--font.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/font.c b/font.c
index aeaa1da7..19753bfc 100644
--- a/font.c
+++ b/font.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: font.c 1.20 2007/06/23 10:41:10 kls Exp $
+ * $Id: font.c 1.21 2007/06/23 11:25:42 kls Exp $
*/
#include "font.h"
@@ -354,9 +354,19 @@ bool cFont::GetAvailableFontNames(cStringList *FontNames, bool Monospaced)
char *s = (char *)FcNameUnparse(fontset->fonts[i]);
if (s) {
// Strip i18n stuff:
+ char *c = strchr(s, ':');
+ if (c) {
+ char *p = strchr(c + 1, ',');
+ if (p)
+ *p = 0;
+ }
char *p = strchr(s, ',');
- if (p)
- *p = 0;
+ if (p) {
+ if (c)
+ memmove(p, c, strlen(c) + 1);
+ else
+ *p = 0;
+ }
// Make it user presentable:
s = strreplace(s, "\\", ""); // '-' is escaped
s = strreplace(s, "style=", "");