summaryrefslogtreecommitdiffstats
path: root/wps
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-06-03 07:30:01 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-06-03 07:30:01 +0000
commit1dc7f490c91993a06b0de1988efece102353455f (patch)
treee991c2cac3f8a1c1cc6d2c63123222bdac0f0442 /wps
parent8be2a90d783e5fd0063e22b76a760a917124c758 (diff)
downloadrockbox-1dc7f490c91993a06b0de1988efece102353455f.tar.gz
rockbox-1dc7f490c91993a06b0de1988efece102353455f.zip
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
Diffstat (limited to 'wps')
-rw-r--r--wps/WPSLIST3
-rwxr-xr-xwps/wpsbuild.pl24
2 files changed, 24 insertions, 3 deletions
diff --git a/wps/WPSLIST b/wps/WPSLIST
index 856022c1ed..13cb263865 100644
--- a/wps/WPSLIST
+++ b/wps/WPSLIST
@@ -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
diff --git a/wps/wpsbuild.pl b/wps/wpsbuild.pl
index 81a90f3c04..57dc3de283 100755
--- a/wps/wpsbuild.pl
+++ b/wps/wpsbuild.pl
@@ -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;
}