1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Centralized default font names

This commit is contained in:
Klaus Schmidinger 2007-06-17 11:54:54 +02:00
parent 3c68ef28d0
commit 5fec367e60
4 changed files with 18 additions and 10 deletions

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: config.c 1.152 2007/06/16 09:30:22 kls Exp $ * $Id: config.c 1.153 2007/06/17 11:54:54 kls Exp $
*/ */
#include "config.h" #include "config.h"
@ -265,9 +265,9 @@ cSetup::cSetup(void)
OSDMessageTime = 1; OSDMessageTime = 1;
UseSmallFont = 1; UseSmallFont = 1;
AntiAlias = 1; AntiAlias = 1;
strcpy(FontOsd, "arialbd.ttf"); strcpy(FontOsd, DefaultFontOsd);
strcpy(FontSml, "arial.ttf"); strcpy(FontSml, DefaultFontSml);
strcpy(FontFix, "courbd.ttf"); strcpy(FontFix, DefaultFontFix);
FontOsdSize = 22; FontOsdSize = 22;
FontSmlSize = 18; FontSmlSize = 18;
FontFixSize = 20; FontFixSize = 20;

6
font.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: font.c 1.17 2007/06/17 11:46:25 kls Exp $ * $Id: font.c 1.18 2007/06/17 11:54:10 kls Exp $
*/ */
#include "font.h" #include "font.h"
@ -16,6 +16,10 @@
#include "osd.h" #include "osd.h"
#include "tools.h" #include "tools.h"
const char *DefaultFontOsd = "Sans Serif:Bold";
const char *DefaultFontSml = "Sans Serif";
const char *DefaultFontFix = "Courier:Bold";
// --- cFreetypeFont --------------------------------------------------------- // --- cFreetypeFont ---------------------------------------------------------
#define KERNING_UNKNOWN (-10000) #define KERNING_UNKNOWN (-10000)

6
font.h
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: font.h 1.17 2007/06/17 11:07:15 kls Exp $ * $Id: font.h 1.18 2007/06/17 11:53:55 kls Exp $
*/ */
#ifndef __FONT_H #ifndef __FONT_H
@ -28,6 +28,10 @@ class cBitmap;
typedef uint32_t tColor; // see also osd.h typedef uint32_t tColor; // see also osd.h
typedef uint8_t tIndex; typedef uint8_t tIndex;
extern const char *DefaultFontOsd;
extern const char *DefaultFontSml;
extern const char *DefaultFontFix;
class cFont { class cFont {
private: private:
static cFont *fonts[]; static cFont *fonts[];

8
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menu.c 1.453 2007/06/17 11:01:13 kls Exp $ * $Id: menu.c 1.454 2007/06/17 11:54:35 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -2179,9 +2179,9 @@ cMenuSetupOSD::cMenuSetupOSD(void)
cFont::GetAvailableFontNames(&fontOsdNames); cFont::GetAvailableFontNames(&fontOsdNames);
cFont::GetAvailableFontNames(&fontSmlNames); cFont::GetAvailableFontNames(&fontSmlNames);
cFont::GetAvailableFontNames(&fontFixNames, true); cFont::GetAvailableFontNames(&fontFixNames, true);
fontOsdNames.Insert(strdup("Sans Serif:Bold")); fontOsdNames.Insert(strdup(DefaultFontOsd));
fontSmlNames.Insert(strdup("Sans Serif")); fontSmlNames.Insert(strdup(DefaultFontSml));
fontFixNames.Insert(strdup("Courier:Bold")); fontFixNames.Insert(strdup(DefaultFontFix));
fontOsdIndex = max(0, fontOsdNames.Find(Setup.FontOsd)); fontOsdIndex = max(0, fontOsdNames.Find(Setup.FontOsd));
fontSmlIndex = max(0, fontSmlNames.Find(Setup.FontSml)); fontSmlIndex = max(0, fontSmlNames.Find(Setup.FontSml));
fontFixIndex = max(0, fontFixNames.Find(Setup.FontFix)); fontFixIndex = max(0, fontFixNames.Find(Setup.FontFix));