New topic: StringHeight returns bigger value than expected
<http://forums.realsoftware.com/viewtopic.php?t=36306> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message gaby Post subject: StringHeight returns bigger value than expectedPosted: Sat Nov 13, 2010 6:48 am Joined: Sat Nov 13, 2010 6:26 am Posts: 1 I need to get the width and height of a character, for example the character "A". For this I try to get the Height of the "A" with Code:h = graphics.StringHeight ("A", graphics.Width) But the returned value is bigger than the "A" is (I've tested it by drawing a box around the "A") I've tried to use g.TextHeight and g.TextAscent but the returned value is always about 1.9x bigger than the "A" actually is. The image below shows which value I need: it is the height of the "A" from the baseline to the top (beginning of the leading-line). Does anyone know how to get this, or maybe if StringHeight contains a bug? Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
