[racket] Interpretation of font information

From: Nadeem Abdul Hamid (nadeem at acm.org)
Date: Fri Nov 15 17:21:34 EST 2013

Not an answer to your question, but maybe you should try just generating
the entire symbol programmatically using pict primitives instead of trying
to get half of it from a font character?
--- nadeem

On Friday, November 15, 2013, Jens Axel Søgaard wrote:

> Hi All,
>
> I want to render simple mathematical formulas using picts.
> Consider a simple example, the square root of x:
>
>     √x
>
> To make this look nice, I want to introduce an overline that draws a bar
> over x.
> The bar should begin where the root sign ends. To do this I need to know
> how high the root sign is. Calculating this has turned out to more
> complicated
> than I expected. If I use a font size of say 30, then the root sign will
> (in
> some fonts) be higher than 30. If I use (text "√" font) to get a pict then
> the pict height will be 30 (for most fonts), but the end of the root sign
> will stick out of the bounding box. It actually makes sense it stick out,
> since this makes it easy to make roots over tall characters such as h.
>
>

-- 

--
Nadeem Abdul Hamid
Associate Professor, Computer Science
Berry College, Mount Berry, GA 30149
http://cs.berry.edu/~nhamid/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20131115/37078789/attachment.html>

Posted on the users mailing list.