[Webkit-unassigned] [Bug 27663] FontPlatformData for Qt requires mapping from FontWeight to QFont::Weight
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 24 12:59:50 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=27663
Adam Treat <treat at kde.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #33461|review? |review-
Flag| |
--- Comment #2 from Adam Treat <treat at kde.org> 2009-07-24 12:59:49 PDT ---
(From update of attachment 33461)
> + static inline QFont::Weight toQFontWeight(FontWeight fontWeight)
> + {
> + QFont::Weight weight;
Unnecessary.
> + switch (fontWeight) {
> + case FontWeight100:
> + case FontWeight200:
> + weight = QFont::Light;
> + break;
return QFont::Light;
> + case FontWeight600:
> + weight = QFont::DemiBold;
return QFont::DemiBold;
And so on...
> - if (description.weight() >= FontWeight600) {
> - m_font.setWeight(QFont::Bold);
> - m_bold = true;
> - } else
> - m_font.setWeight(QFont::Normal);
> +
> + m_font.setWeight(toQFontWeight(description.weight()));
> + m_bold = m_font.bold();
Seems unnecessary to keep 'm_bold' with what you are doing. m_font.bold()
stores the state.
However, this appears to be a behavior change. Are you sure it is correct?
How did you go about determining the proper mapping?
Did you run the layout tests before and after to see if anything changed?
Cheers,
Adam
--
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