On Mon, 12 Jan 2009, Bruno Fassino wrote >In the Firefox source I see this > DWORD len = GetGlyphOutlineW(dc, PRUnichar('x'), GGO_METRICS, &gm, >0, nsnull, &kIdentityMatrix); > ... > mMetrics->xHeight = gm.gmptGlyphOrigin.y; > >I know nothing about this (I'm not even sure to have identified the >correct place in the code), anyway this looks like a sort of rendering >and retrieving of the data for a character.
Well spotted. I missed that one. The function returns glyph information for "x" in a structure at a memory address specified by &gm. One of the values returned in the structure is the top-left x,y co-ordinates of a box that completely encloses the glyph - so given that the box origin is 0,0 then gm.gmptGlyphOrigin.y (xHeight) is the height of the box. Now I'll have to update my web page :-) -- Richard Mason http://www.emdpi.com ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/