Summary: | SVG text smaller than 0.5px not displayed properly | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jeff Schiller <jeffschiller> | ||||
Component: | SVG | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED DUPLICATE | ||||||
Severity: | Normal | CC: | krit, simon.fraser, zimmermann | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | OS X 10.5 | ||||||
URL: | http://http://codedread.com/browser-tests/subpixel.svg | ||||||
Attachments: |
|
Description
Jeff Schiller
2010-12-04 15:01:38 PST
Created attachment 75617 [details]
Test case showing the problem
Thanks for the testcase, Jeff! I've traced it down: #1 0x0426c654 in WebCore::FontCache::createFontPlatformData (this=0x1a5965c0, fontDescription=@0x1d4adda0, family=@0x1d4adda0) at /Users/nikolaszimmermann/Coding/WebKit/WebCore/platform/graphics/mac/FontCacheMac.mm:214 (gdb) p fontDescription $61 = (const class WebCore::FontDescription &) @0x1d4adda0: { m_familyList = { m_family = { m_string = { m_impl = { <WTF::FastAllocBase> = {<No data fields>}, members of WTF::RefPtr<WTF::StringImpl>: m_ptr = 0x1a56e650 } } }, m_next = { <WTF::RefPtr<WebCore::SharedFontFamily>> = { <WTF::FastAllocBase> = {<No data fields>}, members of WTF::RefPtr<WebCore::SharedFontFamily>: m_ptr = 0x0 }, <No data fields>} }, m_specifiedSize = 0.49000001, m_computedSize = 0.49000001, The font size is stored correctly in the FontDescription, but then "computedPixelSize()" is used to determine the actual font size. 193 194 FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family) 195 { 196 NSFontTraitMask traits = fontDescription.italic() ? NSFontItalicTrait : 0; 197 NSInteger weight = toAppKitFontWeight(fontDescription.weight()); 198 float size = fontDescription.computedPixelSize(); (gdb) p size $63 = 0 FontDescription.h: int computedPixelSize() const { return int(m_computedSize + 0.5f); } This is the root of the problem. Just keeping my analysis here for the record. The patch on bug 12448 fixes this problem. Thanks a lot for the testcase, I've integrated it in my patch. *** This bug has been marked as a duplicate of bug 12448 *** Is it really the same thing? In this testcase the text is just a line of pixels (even if it's not sharp). In Firefox, the text is much bigger. (In reply to comment #4) > Is it really the same thing? In this testcase the text is just a line of pixels (even if it's not sharp). In Firefox, the text is much bigger. Which testcase are you referring to? One in a bug that I can't find right now, but was probably marked as a duplicate of this. Yep, that's the one. Sorry, I thought this was that bug. |