forked from len0rd/rockbox
Use a different remote font than the main LCD font
Works for both wps config and settings Only change targets with LCD_REMOTE_HEIGHT <= 64 (irivers) to use 08-Rockfont git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26505 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8be2a90d78
commit
1dc7f490c9
3 changed files with 33 additions and 4 deletions
|
@ -223,6 +223,14 @@ static const char graphic_numeric[] = "graphic,numeric";
|
|||
#define DEFAULT_FONTNAME ""
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
#if LCD_REMOTE_HEIGHT <= 64
|
||||
#define DEFAULT_REMOTE_FONTNAME "08-Rockfont"
|
||||
#else
|
||||
#define DEFAULT_REMOTE_FONTNAME "-"
|
||||
#endif
|
||||
#endif /* HAVE_REMOTE_LCD */
|
||||
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
#define DEFAULT_ICONSET "tango_small"
|
||||
#define DEFAULT_VIEWERS_ICONSET "tango_small_viewers"
|
||||
|
@ -1564,7 +1572,7 @@ const struct settings_list settings[] = {
|
|||
#endif
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
TEXT_SETTING(F_THEMESETTING, remote_font_file, "remote font",
|
||||
"-", FONT_DIR "/", ".fnt"),
|
||||
DEFAULT_REMOTE_FONTNAME, FONT_DIR "/", ".fnt"),
|
||||
#endif
|
||||
TEXT_SETTING(F_THEMESETTING,wps_file, "wps",
|
||||
DEFAULT_WPSNAME, WPS_DIR "/", ".wps"),
|
||||
|
|
|
@ -308,6 +308,9 @@ Font.132x80x16: 11-Sazanami-Mincho.fnt
|
|||
Font.128x64x1: 08-Rockfont.fnt
|
||||
Font.112x64x1: 08-Rockfont.fnt
|
||||
|
||||
# Remote font for iriver
|
||||
Remote Font.128x64x1: 08-Rockfont.fnt
|
||||
|
||||
#misc settings that should be ignored on grayscale targets
|
||||
foreground color: CCCCCC
|
||||
background color: 000000
|
||||
|
|
|
@ -47,6 +47,7 @@ my $rsbs_w_size;
|
|||
my $width;
|
||||
my $height;
|
||||
my $font;
|
||||
my $remotefont;
|
||||
my $fgcolor;
|
||||
my $bgcolor;
|
||||
my $statusbar;
|
||||
|
@ -160,11 +161,11 @@ sub copybackdrop
|
|||
sub copythemefont
|
||||
{
|
||||
#copy the font specified by the theme
|
||||
my $o = $_[0];
|
||||
|
||||
my $o=$font;
|
||||
$o =~ s/\.fnt/\.bdf/;
|
||||
mkdir "$rbdir/fonts";
|
||||
my $cmd ="$ROOT/tools/convbdf -f -o \"$rbdir/fonts/$font\" \"$ROOT/fonts/$o\" ";
|
||||
my $cmd ="$ROOT/tools/convbdf -f -o \"$rbdir/fonts/$_[0]\" \"$ROOT/fonts/$o\" ";
|
||||
`$cmd`;
|
||||
}
|
||||
|
||||
|
@ -288,6 +289,13 @@ MOO
|
|||
push @out, "font: /$rbdir/fonts/$font\n";
|
||||
}
|
||||
}
|
||||
if(defined($remotefont) && $has_remote) {
|
||||
if ($remotefont eq '') {
|
||||
push @out, "remote font: -\n";
|
||||
} else {
|
||||
push @out, "remote font: /$rbdir/fonts/$remotefont\n";
|
||||
}
|
||||
}
|
||||
if($fgcolor && $main_depth > 2) {
|
||||
push @out, "foreground color: $fgcolor\n";
|
||||
}
|
||||
|
@ -405,6 +413,7 @@ while(<WPS>) {
|
|||
undef $width;
|
||||
undef $height;
|
||||
undef $font;
|
||||
undef $remotefont;
|
||||
undef $fgcolor;
|
||||
undef $bgcolor;
|
||||
undef $statusbar;
|
||||
|
@ -492,7 +501,10 @@ while(<WPS>) {
|
|||
copythemeviewericon();
|
||||
}
|
||||
if ($font) {
|
||||
copythemefont();
|
||||
copythemefont($font);
|
||||
}
|
||||
if ($remotefont) {
|
||||
copythemefont($remotefont);
|
||||
}
|
||||
if(!$isrwps) {
|
||||
# We only make .cfg files for <wps> sections:
|
||||
|
@ -554,6 +566,12 @@ while(<WPS>) {
|
|||
elsif($l =~ /^Font\.${main_width}x${main_height}x$main_depth: *(.*)/i) {
|
||||
$font = $1;
|
||||
}
|
||||
elsif($l =~ /^Remote Font\.${remote_width}x${remote_height}x$remote_depth: *(.*)/i) {
|
||||
$remotefont = $1;
|
||||
}
|
||||
elsif($l =~ /^Remote Font: *(.*)/i) {
|
||||
$remotefont = $1;
|
||||
}
|
||||
elsif($l =~ /^Foreground Color: *(.*)/i) {
|
||||
$fgcolor = $1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue