Closed Bug 235793 Opened 22 years ago Closed 20 years ago

fonts look weird in svg tetris sample

Categories

(Core :: SVG, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: basic, Assigned: alex)

References

()

Details

cvs trunk debug build: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040226 Firefox/0.8.0+ The fonts on the tetris sample at croczilla looks weird on a recent svg enabled libart backend Mozilla Firefox gtk2 xft build. Screenshots here: http://basic.mozillanews.org/svg.png http://basic.mozillanews.org/svg2.png
I see about the same thing. GTK1 build of seamonkey, no xft (but freetype enabled to get text working in svg).
here's another shot: http://basic.mozillanews.org/svg-vera-sans.png This time I've only Bitstream Vera Sans (Bold/Bold Italic/Italic/Normal) in my font path.
Hmm... I have that font too....
WFM on 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040302 Firefox/0.8.0+'.
The tetris title is a font of font-size="1px" that is scaled up to some value depending on the size of the viewbox. So effectively we have something like this: <svg:text font-size="1px" transform="scale(10)">Foo</svg:text> which should result in a "Foo" of effective size "10px". The way this is rendered by the libart/freetype backend is to get a FT glyph of size 1px and then let FT transform it according to the current transform matrix. This works fine for MS fonts, but the Vera fonts seem to have a problem when being scaled up like that. I'm inclined to mark this INVALID or WONTFIX, but possibly we could extract the scale from the current transform matrix and request fonts at a more appropriate size rather than relying on FT to scale correctly from subpixels. The relevant code is in layout/renderer/src/libart/nsSVGLibartGlyphMetrics.cpp & nsSVGLibartGlyphGeometry.cpp. Any takers?
So the current approach is problematic if the font includes glyphs custom-tailored for specific size ranges, right?
Marking wontfix. We have no plans to continue development of the libart backend.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.