Bug 104127 - [Qt] Implement SimpleFontData::platformBoundsForGlyph
Summary: [Qt] Implement SimpleFontData::platformBoundsForGlyph
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Allan Sandfeld Jensen
URL:
Keywords:
Depends on:
Blocks: 110211
  Show dependency treegraph
 
Reported: 2012-12-05 08:34 PST by Allan Sandfeld Jensen
Modified: 2013-02-19 05:11 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.85 KB, patch)
2012-12-05 08:37 PST, Allan Sandfeld Jensen
no flags Details | Formatted Diff | Diff
Patch (1.60 KB, patch)
2012-12-17 01:34 PST, Allan Sandfeld Jensen
jturcotte: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Sandfeld Jensen 2012-12-05 08:34:41 PST
We are missing a Qt implementation of platformBoundsForGlyph. This method is essential to working MathML and Ruby support.

With this method implementated MathML is possible to enable and use.
Comment 1 Allan Sandfeld Jensen 2012-12-05 08:37:04 PST
Created attachment 177760 [details]
Patch
Comment 2 Jocelyn Turcotte 2012-12-06 04:51:49 PST
Comment on attachment 177760 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=177760&action=review

> Source/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp:72
> +    // Round to pixel bounds.
> +    return enclosingIntRect(bounds);

Other platforms don't seem to round it, why do we need to?
Comment 3 Allan Sandfeld Jensen 2012-12-06 09:06:14 PST
(In reply to comment #2)
> (From update of attachment 177760 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=177760&action=review
> 
> > Source/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp:72
> > +    // Round to pixel bounds.
> > +    return enclosingIntRect(bounds);
> 
> Other platforms don't seem to round it, why do we need to?

Actually I followed Chromium here. They round whenever they don't have subpixel text rendering, and I think we currently use integer metrics only in Qt. I didn't see any artifacts when I ran it without rounding though, so I can't really say we need it.
Comment 4 Allan Sandfeld Jensen 2012-12-17 01:34:30 PST
Created attachment 179702 [details]
Patch

Do not round so that returned width matches that of platformWidthForGlyph
Comment 5 Allan Sandfeld Jensen 2013-01-03 00:43:58 PST
Committed r138703: <http://trac.webkit.org/changeset/138703>