Glyphs OriginY meaningHello,<br/> <br/> I am trying to figure out how to find the precise coordinates of the bounding rectangle of a Glyphs object.<br/> In Silverlight, I am trying to display a rectangle around a Glyphs object. The XAML is from a XPS generated with Microsoft XPS Document Writer<br/> <br/> OriginY does not seem to be the top nor bottom of text rectangle.<br/> OriginX however is OK.<br/> If I draw a horizontal line at the OriginY it seems that it's right at the bottom of the letters like 'a','b','c' which is fine but not for a character like 'y'. For character 'y' the line is crossing it in the middle.<br/> <br/> There is no RenderTransform specified so that's not the problem.<br/> <br/> For instance, I generated a XPS from a Word document with no margins. Looking in the generated XPS i see that OriginY for the Glyphs has a non zero value.<br/> <br/> Can anybody give a hint about how that coordinate is generated?<br/> <br/> <br/> Thanks.© 2009 Microsoft Corporation. All rights reserved.Fri, 15 May 2009 09:28:10 Zab13ce2c-7401-4a5f-ae39-0e295da5fd9dhttp://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/ab13ce2c-7401-4a5f-ae39-0e295da5fd9d#ab13ce2c-7401-4a5f-ae39-0e295da5fd9dhttp://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/ab13ce2c-7401-4a5f-ae39-0e295da5fd9d#ab13ce2c-7401-4a5f-ae39-0e295da5fd9dIlmslbhttp://social.msdn.microsoft.com/Profile/en-US/?user=IlmslbGlyphs OriginY meaningHello,<br/> <br/> I am trying to figure out how to find the precise coordinates of the bounding rectangle of a Glyphs object.<br/> In Silverlight, I am trying to display a rectangle around a Glyphs object. The XAML is from a XPS generated with Microsoft XPS Document Writer<br/> <br/> OriginY does not seem to be the top nor bottom of text rectangle.<br/> OriginX however is OK.<br/> If I draw a horizontal line at the OriginY it seems that it's right at the bottom of the letters like 'a','b','c' which is fine but not for a character like 'y'. For character 'y' the line is crossing it in the middle.<br/> <br/> There is no RenderTransform specified so that's not the problem.<br/> <br/> For instance, I generated a XPS from a Word document with no margins. Looking in the generated XPS i see that OriginY for the Glyphs has a non zero value.<br/> <br/> Can anybody give a hint about how that coordinate is generated?<br/> <br/> <br/> Thanks.Wed, 13 May 2009 11:08:29 Z2009-05-13T11:08:39Zhttp://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/ab13ce2c-7401-4a5f-ae39-0e295da5fd9d#831c1e1b-3a5f-42b6-a5f2-bc381c6599a8http://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/ab13ce2c-7401-4a5f-ae39-0e295da5fd9d#831c1e1b-3a5f-42b6-a5f2-bc381c6599a8nixpshttp://social.msdn.microsoft.com/Profile/en-US/?user=nixpsGlyphs OriginY meaning<div>Hi,</div> <div><br/></div> It's the location of the Glyph's baseline: <a href="http://en.wikipedia.org/wiki/Baseline_(typography)">http://en.wikipedia.org/wiki/Baseline_(typography)</a> <div><br/></div> <div>Section 5.1.1 in the XPS 1.0 spec has a nice picture explaining this.</div> <div><br/></div> <div>Regards,</div> <div>Nick.</div><hr class="sig">Check out my cross platform xps library and tools at http://nixps.comThu, 14 May 2009 08:16:40 Z2009-05-14T08:16:40Zhttp://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/ab13ce2c-7401-4a5f-ae39-0e295da5fd9d#c6ed5777-712c-41a3-bb87-d9d06ac23e19http://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/ab13ce2c-7401-4a5f-ae39-0e295da5fd9d#c6ed5777-712c-41a3-bb87-d9d06ac23e19Ilmslbhttp://social.msdn.microsoft.com/Profile/en-US/?user=IlmslbGlyphs OriginY meaningHi nixps, <br/><br/>Thanks alot for your answer.<br/><br/>I suppose finding the bounding box implies parsing the actual font file and use the metrics of the font.<br/><br/>What I mean is thereisn't any way to aproximate it just with the Glyphs attributes, correct?<br/><br/>Thanks.Fri, 15 May 2009 09:28:10 Z2009-05-15T09:28:10Z