summaryrefslogtreecommitdiff
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
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
-rw-r--r--apps/settings_list.c10
-rw-r--r--wps/WPSLIST3
-rwxr-xr-xwps/wpsbuild.pl24
3 files changed, 33 insertions, 4 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c
index d6f5f94f66..1e2b4ebb18 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -223,6 +223,14 @@ static const char graphic_numeric[] = "graphic,numeric";
223 #define DEFAULT_FONTNAME "" 223 #define DEFAULT_FONTNAME ""
224#endif 224#endif
225 225
226#ifdef HAVE_REMOTE_LCD
227#if LCD_REMOTE_HEIGHT <= 64
228 #define DEFAULT_REMOTE_FONTNAME "08-Rockfont"
229#else
230 #define DEFAULT_REMOTE_FONTNAME "-"
231#endif
232#endif /* HAVE_REMOTE_LCD */
233
226#ifdef HAVE_LCD_COLOR 234#ifdef HAVE_LCD_COLOR
227 #define DEFAULT_ICONSET "tango_small" 235 #define DEFAULT_ICONSET "tango_small"
228 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers" 236 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers"
@@ -1564,7 +1572,7 @@ const struct settings_list settings[] = {
1564#endif 1572#endif
1565#ifdef HAVE_REMOTE_LCD 1573#ifdef HAVE_REMOTE_LCD
1566 TEXT_SETTING(F_THEMESETTING, remote_font_file, "remote font", 1574 TEXT_SETTING(F_THEMESETTING, remote_font_file, "remote font",
1567 "-", FONT_DIR "/", ".fnt"), 1575 DEFAULT_REMOTE_FONTNAME, FONT_DIR "/", ".fnt"),
1568#endif 1576#endif
1569 TEXT_SETTING(F_THEMESETTING,wps_file, "wps", 1577 TEXT_SETTING(F_THEMESETTING,wps_file, "wps",
1570 DEFAULT_WPSNAME, WPS_DIR "/", ".wps"), 1578 DEFAULT_WPSNAME, WPS_DIR "/", ".wps"),
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
308Font.128x64x1: 08-Rockfont.fnt 308Font.128x64x1: 08-Rockfont.fnt
309Font.112x64x1: 08-Rockfont.fnt 309Font.112x64x1: 08-Rockfont.fnt
310 310
311# Remote font for iriver
312Remote Font.128x64x1: 08-Rockfont.fnt
313
311#misc settings that should be ignored on grayscale targets 314#misc settings that should be ignored on grayscale targets
312foreground color: CCCCCC 315foreground color: CCCCCC
313background color: 000000 316background 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;
47my $width; 47my $width;
48my $height; 48my $height;
49my $font; 49my $font;
50my $remotefont;
50my $fgcolor; 51my $fgcolor;
51my $bgcolor; 52my $bgcolor;
52my $statusbar; 53my $statusbar;
@@ -160,11 +161,11 @@ sub copybackdrop
160sub copythemefont 161sub copythemefont
161{ 162{
162 #copy the font specified by the theme 163 #copy the font specified by the theme
164 my $o = $_[0];
163 165
164 my $o=$font;
165 $o =~ s/\.fnt/\.bdf/; 166 $o =~ s/\.fnt/\.bdf/;
166 mkdir "$rbdir/fonts"; 167 mkdir "$rbdir/fonts";
167 my $cmd ="$ROOT/tools/convbdf -f -o \"$rbdir/fonts/$font\" \"$ROOT/fonts/$o\" "; 168 my $cmd ="$ROOT/tools/convbdf -f -o \"$rbdir/fonts/$_[0]\" \"$ROOT/fonts/$o\" ";
168 `$cmd`; 169 `$cmd`;
169} 170}
170 171
@@ -288,6 +289,13 @@ MOO
288 push @out, "font: /$rbdir/fonts/$font\n"; 289 push @out, "font: /$rbdir/fonts/$font\n";
289 } 290 }
290 } 291 }
292 if(defined($remotefont) && $has_remote) {
293 if ($remotefont eq '') {
294 push @out, "remote font: -\n";
295 } else {
296 push @out, "remote font: /$rbdir/fonts/$remotefont\n";
297 }
298 }
291 if($fgcolor && $main_depth > 2) { 299 if($fgcolor && $main_depth > 2) {
292 push @out, "foreground color: $fgcolor\n"; 300 push @out, "foreground color: $fgcolor\n";
293 } 301 }
@@ -405,6 +413,7 @@ while(<WPS>) {
405 undef $width; 413 undef $width;
406 undef $height; 414 undef $height;
407 undef $font; 415 undef $font;
416 undef $remotefont;
408 undef $fgcolor; 417 undef $fgcolor;
409 undef $bgcolor; 418 undef $bgcolor;
410 undef $statusbar; 419 undef $statusbar;
@@ -492,7 +501,10 @@ while(<WPS>) {
492 copythemeviewericon(); 501 copythemeviewericon();
493 } 502 }
494 if ($font) { 503 if ($font) {
495 copythemefont(); 504 copythemefont($font);
505 }
506 if ($remotefont) {
507 copythemefont($remotefont);
496 } 508 }
497 if(!$isrwps) { 509 if(!$isrwps) {
498 # We only make .cfg files for <wps> sections: 510 # We only make .cfg files for <wps> sections:
@@ -554,6 +566,12 @@ while(<WPS>) {
554 elsif($l =~ /^Font\.${main_width}x${main_height}x$main_depth: *(.*)/i) { 566 elsif($l =~ /^Font\.${main_width}x${main_height}x$main_depth: *(.*)/i) {
555 $font = $1; 567 $font = $1;
556 } 568 }
569 elsif($l =~ /^Remote Font\.${remote_width}x${remote_height}x$remote_depth: *(.*)/i) {
570 $remotefont = $1;
571 }
572 elsif($l =~ /^Remote Font: *(.*)/i) {
573 $remotefont = $1;
574 }
557 elsif($l =~ /^Foreground Color: *(.*)/i) { 575 elsif($l =~ /^Foreground Color: *(.*)/i) {
558 $fgcolor = $1; 576 $fgcolor = $1;
559 } 577 }