[Webkit-unassigned] [Bug 32794] With text-rendering: optimizelegibility, sometimes lines run too long
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 6 17:29:22 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=32794
--- Comment #5 from Darin Adler <darin at apple.com> 2010-01-06 17:29:22 PST ---
(From update of attachment 46010)
> + TextRenderingMode textRenderingMode = f.fontDescription().textRenderingMode();
> + // Non-zero only when kerning is enabled, in which case we measure words with their trailing
> + // space, then subtract its width.
> + int wordTrailingSpaceWidth = textRenderingMode == OptimizeLegibility || textRenderingMode == GeometricPrecision ? f.spaceWidth() + wordSpacing : 0;
I think it would be clearer to have a function named allowsKerning or something
like that. It could contain:
TextRenderingMode textRenderingMode =
f.fontDescription().textRenderingMode();
textRenderingMode == OptimizeLegibility || textRenderingMode ==
GeometricPrecision
Then you could saw:
wordTrailingSpaceWidth = allowsKerning(f) ? f.spaceWidth() + wordSpacing :
0;
Maybe there's a better name than "allows kerning", though.
--
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