[Webkit-unassigned] [Bug 50528] Text smaller than 0.5px not displayed properly
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 9 01:13:05 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=50528
--- Comment #2 from Nikolas Zimmermann <zimmermann at kde.org> 2010-12-09 01:13:05 PST ---
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.
--
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