[prev in list] [next in list] [prev in thread] [next in thread] 

List:       graphviz-interest
Subject:    Re: [graphviz-interest] font-weight in SVG output
From:       seth () swoolley ! homeip ! net
Date:       2007-06-13 14:51:36
Message-ID: 20070613145136.GA23426 () swoolley ! homeip ! net
[Download RAW message or body]

Hi Jon,

I don't know if it's been fixed yet, since I'm just looking at a fairly 
old copy of the source (2.12), but I think I see your problem.

The problem I see is that the SVG output plugin merely uses the 
postscript font weight directly and is not mapping to CSS2 compatible 
output.

See lib/common/ps_font_equiv.h (the third column) as defined by 
PostscriptAlias in lib/common/textpara.h, which informs 
lib/common/fontmetrics.c's translate_postscript_fontname and is later 
used by plugin/core/gvrender_core_svg.c's svg_textpara to fill in the 
font-weight css value.

in gvrender_core_svg.c:

        if (para->postscript_alias->weight)
            core_printf(job, "font-weight:%s;", para->postscript_alias->weight);

You can modify that to make it map appropriately to the correct value 
and recompile.  (If you beat me to a patch, please post one, since I'd 
like it fixed, too.)

Seth

On Tue, Jun 12, 2007 at 12:25:18PM -0600, Jon Trauntvein wrote:
> I am using dot to generate graphic representations of state charts as 
> SVG images to be included in docbook documentation.  Batik (the SVG 
> interpreter) is complaining that the font-weight specifier ("regular") 
> is not valid (it should be normal according to the CSS2 standard).  My 
> question is two-fold:
> 
>   - Is this a problem with the SVG output that has been fixed?
> 
>   - If not, is there a work-around available?
> 
> Thanks in advance,
> 
> Jon Trauntvein
> 
> _______________________________________________
> graphviz-interest@research.att.com
> https://mailman.research.att.com/mailman/listinfo/graphviz-interest
_______________________________________________
graphviz-interest@research.att.com
https://mailman.research.att.com/mailman/listinfo/graphviz-interest
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic