[Webkit-unassigned] [Bug 75091] [SVG] Text does not show after scripted scaling.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Feb 13 12:38:22 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=75091
Philip Rogers <pdr at google.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pdr at google.com
--- Comment #5 from Philip Rogers <pdr at google.com> 2012-02-13 12:38:22 PST ---
(In reply to comment #4)
> (From update of attachment 126691 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=126691&action=review
>
> > Source/WebCore/ChangeLog:9
> > + computeNewScaledFontForStyle did not use smart minimums for fonts,
> > + resulting in fonts being rendered with very small sizes (eg, 0.001).
>
> Can you elaborate a bit? I'm not sure I understand fully yet.
> RenderSVGInlineText should always request "absolute, scaled-up font sizes" in the on screen coordinate system.
> eg for <svg viewBox="0 0 1 1" width="400" height="400"><font size="0.5" it'll request a font-size with 200px, not with 0.5.
>
> I'm trying to understand why we still get into the case where we request tiny font sizes like this.
We get into this case in situations like the following:
<g id="scale" transform="scale(0.0001)" opacity="1">
<text x="10" y="50" font-size="40">***</text>
</g>
This essentially has an "on-screen" font size of 0.0001*40 = 0.004. This patch avoids this degenerate case of a 0.004 font size. Instead of rendering with 0.004, this patch says to use some smart minimum (say, 5) and adjust the scale factor appropriately. I don't particularly like using the CSS smart font minimum, but checking if the font size is less than some constant doesn't seem like a good idea. Any ideas here?
It seems to me that almost any way it's implemented seems to be okay with the spec, which seems to imply to use CSS rules:
http://www.w3.org/TR/SVG/text.html#FontSizeProperty
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list