[webkit-dev] Re: [webkit-changes] [29025] trunk/WebCore

Nikolas Zimmermann zimmermann at physik.rwth-aachen.de
Sat Dec 29 02:01:41 PST 2007


Heya Darin,

I was too tired this morning to wait for a completed win/wx build.  
Thanks for fixing!
Probably all metrics functions need the size() parameter, I only need  
ascent/descent
right now to calculate the right values for SVG fonts (ascent *  
size / unitsPerEm).
This may change in future, as more SVG Font work is done.

Hope that clarifies it a bit..

Greetings,
Niko

Am 29.12.2007 um 08:42 schrieb darin at apple.com:

> Revision
> 29025
> Author
> darin at apple.com
> Date
> 2007-12-28 23:42:17 -0800 (Fri, 28 Dec 2007)
> Log Message
>
>         - try to fix Windows and WX builds (broken by SVG Fonts  
> check-in)
>
>         * platform/graphics/win/FontWin.cpp:
>         (WebCore::Font::drawGlyphs): Pass font size to  
> FontData::ascent, now that it requires it.
>         I can't see how it can be right to require the font size  
> for ascent and descent,
>         but not for other metrics functions in FontData.
>
>         * platform/graphics/wx/FontWx.cpp:
>         (WebCore::Font::drawGlyphs): Pass font size to  
> FontData::ascent and FontData::descent.
> Modified Paths
>
> trunk/WebCore/ChangeLog
> trunk/WebCore/platform/graphics/win/FontWin.cpp
> trunk/WebCore/platform/graphics/wx/FontWx.cpp
> Diff
>
> Modified: trunk/WebCore/ChangeLog (29024 => 29025)
>
> --- trunk/WebCore/ChangeLog	2007-12-29 07:35:17 UTC (rev 29024)
> +++ trunk/WebCore/ChangeLog	2007-12-29 07:42:17 UTC (rev 29025)
> @@ -1,3 +1,15 @@
> +2007-12-28  Darin Adler  <darin at apple.com>
> +
> +        - try to fix Windows and WX builds (broken by SVG Fonts  
> check-in)
> +
> +        * platform/graphics/win/FontWin.cpp:
> +        (WebCore::Font::drawGlyphs): Pass font size to  
> FontData::ascent, now that it requires it.
> +        I can't see how it can be right to require the font size  
> for ascent and descent,
> +        but not for other metrics functions in FontData.
> +
> +        * platform/graphics/wx/FontWx.cpp:
> +        (WebCore::Font::drawGlyphs): Pass font size to  
> FontData::ascent and FontData::descent.
> +
>  2007-12-28  Dan Bernstein  <mitz at apple.com>
>
>          Reviewed by Mark Rowe.
> Modified: trunk/WebCore/platform/graphics/win/FontWin.cpp (29024 =>  
> 29025)
>
> --- trunk/WebCore/platform/graphics/win/FontWin.cpp	2007-12-29  
> 07:35:17 UTC (rev 29024)
> +++ trunk/WebCore/platform/graphics/win/FontWin.cpp	2007-12-29  
> 07:42:17 UTC (rev 29025)
> @@ -61,7 +61,7 @@
>          }
>
>          // We put slop into this rect, since glyphs can overflow  
> the ascent/descent bounds and the left/right edges.
> -        IntRect textRect(point.x() - font->lineGap(), point.y() -  
> font->ascent() - font->lineGap(), totalWidth + 2 * font->lineGap(),  
> font->lineSpacing());
> +        IntRect textRect(point.x() - font->lineGap(), point.y() -  
> font->ascent(size()) - font->lineGap(), totalWidth + 2 * font- 
> >lineGap(), font->lineSpacing());
>          HDC hdc = graphicsContext->getWindowsContext(textRect);
>          SelectObject(hdc, font->m_font.hfont());
>
> Modified: trunk/WebCore/platform/graphics/wx/FontWx.cpp (29024 =>  
> 29025)
>
> --- trunk/WebCore/platform/graphics/wx/FontWx.cpp	2007-12-29  
> 07:35:17 UTC (rev 29024)
> +++ trunk/WebCore/platform/graphics/wx/FontWx.cpp	2007-12-29  
> 07:42:17 UTC (rev 29025)
> @@ -68,7 +68,7 @@
>      }
>
>      // the y point is actually the bottom point of the text, turn  
> it into the top
> -    float height = font->ascent() - font->descent();
> +    float height = font->ascent(size()) - font->descent(size());
>      wxCoord ypoint = (wxCoord) (point.y() - height);
>
>      dc->DrawText(text, (wxCoord)point.x(), ypoint);
> _______________________________________________
> webkit-changes mailing list
> webkit-changes at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-changes

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20071229/28eb514a/attachment.html


More information about the webkit-dev mailing list