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

Re: Bug in gfont?

On Wed, 5 May 1999, Rafael Cordones Marcos wrote:

> Hi,
> 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


i don't consider it as a bug, it works as expected.

Maybe you want something like
  <set-var GFONT_BASE="$(ROOT)/img/$(WML_SRC_BASENAME)">

It isn't sufficient if you have duplicate filenames.
In that case, let's play with the pass 2:

# rel-path is the ``end'' part of the path, with ROOT removed
   <set-var rel-path=<match $(WML_SRC_DIRNAME)
        <concat <subst-in-string $(ROOT) "\\.\\." "[^/]*">$>
   <set-var GFONT_BASE=<concat
      <subst-in-string <get-var rel-path> "/" "_">

In the top .wmlrc, define the ROOT variable like this:

Then when running wml on $(ROOT)/foo/bar/baz.wml,
  $(ROOT)/img/foo_bar_baz.gfont000.gif ...
are generated.


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