[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:39:28 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=32794
--- Comment #6 from mitz at webkit.org 2010-01-06 17:39:28 PST ---
(In reply to comment #5)
> (From update of attachment 46010 [details])
> > + 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.
I intend to add two Font methods (one for kerning and one for ligatures) and
deploy them here and in the many other places that currently access the
TextRenderingMode.
--
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