On Fri, Apr 01, 2005 at 07:50:04PM +0200, Frank Küster wrote:
> Peter De Wachter <[EMAIL PROTECTED]> wrote:
> > To get replacement fonts, you can depend on ttf-bitstream-vera,
> > ttf-freefont, or one of the other free fonts packaged in Debian.
> 
> Do you know which files from these packages could be used instead of the
> ones included in freewrl?  I don't know *how* freewrl uses them, but I
> saw that they are simply copied in the binary-arch target of
> debian/rules - it should be straightforward to create symlinks.  One
> would just have to know which targets to point to...

The fonts are, as far as I can see, only referenced in a single
function, so it's not hard to change them. A patch that does this is
attached. The patch also changes the font path, so there's no need to
create symlinks.
diff -ru freewrl-1.07/CFrontEnd/fw2init.pl freewrl-pdw/CFrontEnd/fw2init.pl
--- freewrl-1.07/CFrontEnd/fw2init.pl   2004-06-29 21:06:53.000000000 +0200
+++ freewrl-pdw/CFrontEnd/fw2init.pl    2005-04-04 03:00:04.992731032 +0200
@@ -41,19 +41,8 @@
        $be = $b->{BE};
        
        # fonts
-       my $testpath =  "$VRML::ENV{FREEWRL_BUILDDIR}/fonts";
-       if (-e "$testpath/Baubodi.ttf") {
-               VRML::VRMLFunc::save_font_path($testpath);
-       } else {
-               foreach (@INC) {
-                       $testpath =  "$_/VRML/fonts";
-                       if (-e "$testpath/Baubodi.ttf") {
-                               VRML::VRMLFunc::save_font_path($testpath);
-                               # print "found font path at $testpath\n";
-                               return;
-                       }
-               }
-       }
+       VRML::VRMLFunc::save_font_path(
+                "/usr/share/fonts/truetype/ttf-bitstream-vera/");
 }
 
 sub load_file_intro {
diff -ru freewrl-1.07/CFuncs/Text.c freewrl-pdw/CFuncs/Text.c
--- freewrl-1.07/CFuncs/Text.c  2004-06-29 21:06:53.000000000 +0200
+++ freewrl-pdw/CFuncs/Text.c   2005-04-04 02:57:35.165508232 +0200
@@ -249,22 +249,23 @@
        strcpy (thisfontname, sys_fp);
        switch (num) {
                /* Serif, norm, bold, italic, bold italic */
-       case 0x04: strcat (thisfontname,"/Amrigon.ttf"); break;
-       case 0x05: strcat (thisfontname,"/Amrigob.ttf"); break;
-       case 0x06: strcat (thisfontname,"/Amrigoi.ttf"); break;
-       case 0x07: strcat (thisfontname,"/Amrigobi.ttf"); break;
+                /* Vera Serif doesn't have an italic version */
+       case 0x04: strcat (thisfontname,"/VeraSe.ttf"); break;
+       case 0x05: strcat (thisfontname,"/VeraSeBd.ttf"); break;
+       case 0x06: strcat (thisfontname,"/VeraSe.ttf"); break;
+       case 0x07: strcat (thisfontname,"/VeraSeBd.ttf"); break;
 
                /* Sans, norm, bold, italic, bold italic */
-       case 0x08: strcat (thisfontname,"/Baubodn.ttf"); break;
-       case 0x09: strcat (thisfontname,"/Baubodn.ttf"); break;
-       case 0x0a: strcat (thisfontname,"/Baubodi.ttf"); break;
-       case 0x0b: strcat (thisfontname,"/Baubodbi.ttf"); break;
+       case 0x08: strcat (thisfontname,"/Vera.ttf"); break;
+       case 0x09: strcat (thisfontname,"/VeraBd.ttf"); break;
+       case 0x0a: strcat (thisfontname,"/VeraIt.ttf"); break;
+       case 0x0b: strcat (thisfontname,"/VeraBI.ttf"); break;
 
                /* Typewriter, norm, bold, italic, bold italic */
-       case 0x10: strcat (thisfontname,"/Futuran.ttf"); break;
-       case 0x11: strcat (thisfontname,"/Futurab.ttf"); break;
-       case 0x12: strcat (thisfontname,"/Futurabi.ttf"); break;
-       case 0x13: strcat (thisfontname,"/Futurabi.ttf"); break;
+       case 0x10: strcat (thisfontname,"/VeraMono.ttf"); break;
+       case 0x11: strcat (thisfontname,"/VeraMoBd.ttf"); break;
+       case 0x12: strcat (thisfontname,"/VeraMoIt.ttf"); break;
+       case 0x13: strcat (thisfontname,"/VeraMoBI.ttf"); break;
 
        default: printf ("dont know how to handle font id %x\n",num);
        }

Reply via email to