[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Bug in gfont?


I think I found a bug in gfont... well, sorry, in gfont.wml

>From the wml::des:gfont man page I understand that I can define a 
GFONT_BASE variable so I can place all generated images in a
directory. The problem is that if you have two wml files and they both
use the <big > tag then gfont images generated by the second file
overwrite the first's. I am using WML 1.6.8

This is because gfont.wml uses a global variable that gets initialized
to 0 for every wml file. I solved this by adding 

   #   (note %0 has to be preserved because of Pass2, i.e. MetaHTML)
   $file = sprintf("%s.gfont%"."03d.gif", $base, $gfont_cnt++);

   # Maybe the file already exists
   while (-e $file) {
      $file = sprintf("%s.gfont%"."03d.gif",
      $base, $gfont_cnt++);

BUT... now I think that following invocations of wml on those files
will create ALLWAYS new GIF files and leave the other file unusable. :(

Best regards,

Rafa C. Marcos
BCN Art Directe (Promotora d'Art)

   Info on Euroart'99 and Index·Art at: http://www.bcnartdirecte.com

Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com