[Webkit-unassigned] [Bug 6274] text repainting does not account for glyphs which draw outside the typographic bounds of the font
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 6 15:15:58 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=6274
--- Comment #30 from mitz at webkit.org 2010-04-06 15:15:56 PST ---
(From update of attachment 52670)
> -const float cGlyphWidthUnknown = -1;
> +const float cGlyphSizeUnknown = -1;
NaN might be a better choice here.
> #include "GlyphPageTreeNode.h"
> -#include "GlyphWidthMap.h"
> +#include "GlyphMetricsMap.h"
These are not in ASCII order now.
> + if ((metricsMode == GlyphWidthOnly && metrics.horizontalAdvance != cGlyphSizeUnknown) || (metricsMode == GlyphBoundingBox && metrics.boundingBox.width() != cGlyphSizeUnknown && metrics.boundingBox.height() != cGlyphSizeUnknown))
> + return metrics;
Checking bot width() and height() seems like an overkill.
> - width = fontData->widthForGlyph(glyph);
> + width = fontData->metricsForGlyph(glyph, GlyphWidthOnly).horizontalAdvance;
This change seems unnecessary. widthForGlyph does just what you want.
> + if (metricsMode == GlyphBoundingBox) {
I would write this as an early return.
> + if (metricsMode == GlyphBoundingBox) {
Ditto.
The rendering part of the code needs to be reviewed by someone other than
myself, since I wrote it.
--
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