Re: svg export -- tricks on font rendering by Firefox

On 01.09.2007 19:00, Lars Clausen wrote:
On Sat, 2007-09-01 at 15:43 +0200, Thomas Harding wrote:
I make tests on Firefox, and found appropriates values for text
we need to:
  -- divide the font-size value by 53
There should be some very good explanation for such an abritrary scaling,
but I doubt there is. There is some analysis of the problem in

  -- add "mm" to the font-size

53???  Let's give that a swing... attached is a screenshot of what that
looks like in Firefox 1.5 (scaled down a bit).  
IIRC Firfox 1.5 did not have a native SVG facility at all, but there were
just early testing builds including it.
Is 2.0 better at this?

Yes and no. It can render a lot more SVG with every release but compared to
other SVG viewers/editors the subset is still limited. IMO Firfox
definitely does not (yet) deserve to be treated as a reference SVG
implementation, like one is used to do for HTML.

I'd be a lot more enthusiastic about improving SVG if a) different
renderers would actually agree on how it's rendered (especially text),
Dia currently offers up to three SVG export options (the basic C version, a
Python plug-in and rendering SVG through cairo - if the experimental cairo
plug-in is built and the cairo version is new enough.

All take somewhat different approaches, but there is only one which also
must create SVG readable by Dia, due to the fact that Dia's shape format is
SVG based.
Changing the SVG of DiaSvgRenderer to work-around some 'random' SVG viewers
does not look like the right aproach to me. The base class is used for
simple ('built-in') svg export but also for the Shape export.
Even the TextLine stuff does not belong there IMO as long at it turns the
alignment (text-anchor:[start|middle|end]) into some self calculated text
positioning, but without gurarnteed textLength. Having some text with
difference is IMO much more acceptabe when the basic alignment is kept.
But with current Firefox that attribute isn't respected either!

and b) the sizes I provide in the SVG are not blatantly ignored.

See above. Of course it would be nice if the SVG renderers out there would
respect this. OTOH the weak support is understandable, even Dia's current
rendering model does not really allow to handle this.

BTW: I'm currently working on a real fix for
including some "round-trip" capabilities, i.e. what Dia writes with it's
SVG export looks very similar when imported again. Expect a commit this
weekend ;)


-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert

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