Hi Dylan.

Dylan Browne:
> Thanks for that. We will look into the impact of using an SVG font as a
> matter of urgency.
> 
> Further info.... it seems like the bounding box of a text element is
> being returned as the same dimensions regardless of the font-size that
> is applied. This suggests it is assuming the default font-size?
> Suggesting that the font-size in the CSS is not being picked up?

That does seem strange.

> We are currently using SSL in our own environment, where our
> certificates may not be set up completely correctly. Is it possible that
> when we use getBBox() there is a refusal in a handshake somewhere along
> the line, so the stylesheet is not accessible? And thus all the bBoxes
> are not assessed correctly? Does getBBox work like that. The baseUrl of
> the document is set using the current URL so that would
> https://blahblah/, if that is relevant.

If your stylesheets are external, then I guess that could be an issue.
What if you set the font-size within the document itself?

getBBox() should return a tight bounding box of the union of all of the
glyphs rendered by the <text> element.  So yes, if the font size is
different, the bounding box will be different.

> I should point out that the initial failure is occuring when we create a
> document in memory which is never actually rendered, to this we add
> components (mostly Text) with given styles to assess their dimensions,
> and using those dimensions we assess our layout.
> 
> When we view the final SVG, the styles are applied fine, and everything
> is as expected, except for a downward shift in the locations of most
> components.

What about if you put text-rendering="geometricPrecision" on the
document element?  Does that give you consistent results?

I think we may need to see a reduced test case that demonstrates the
problem to be able to help much further.

Cameron

-- 
Cameron McCormack, http://mcc.id.au/
        xmpp:[EMAIL PROTECTED]  ▪  ICQ 26955922  ▪  MSN [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to