From 1dc7f490c91993a06b0de1988efece102353455f Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Thu, 3 Jun 2010 07:30:01 +0000 Subject: 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 --- wps/wpsbuild.pl | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'wps/wpsbuild.pl') 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() { undef $width; undef $height; undef $font; + undef $remotefont; undef $fgcolor; undef $bgcolor; undef $statusbar; @@ -492,7 +501,10 @@ while() { copythemeviewericon(); } if ($font) { - copythemefont(); + copythemefont($font); + } + if ($remotefont) { + copythemefont($remotefont); } if(!$isrwps) { # We only make .cfg files for sections: @@ -554,6 +566,12 @@ while() { 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; } -- cgit v1.2.3