xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Lilley <ch...@w3.org>
Subject Re: Text size
Date Fri, 05 Oct 2001 14:31:41 GMT

Scott Moore wrote:

> The real problem I have is determining how big to make the legend so the
> words don't flow off the picture.  Because I allow the users to choose the
> font and size, I'm currently using some haphazard calculations based on font
> size to guesstimate the maximum size needed.  After tweaking it, it seems to
> work pretty well for proportional fonts.  It isn't the ideal solution, but
> sounds like that's about the best I can do for now.

If you use an SVG font you can iterate through the string and tell the
exact width of it by adding all the glyph widths.

> I have one question about font sizes.  When specifying a pt size (say a 10
> point font), what exactly does that mean?  How does it correspond to pixels?

Depeds on the screen resolution.

> Or is it even possible to relate to pixels? 

If you want to specify in pixels, you can do exactly that.

>  Because I'm generating JPEG and
> PNG files from Batik, I tend to base my coordinate system in terms of
> pixels. 

You can directly  ask for a 12px font or whatever, rathder than using pt


To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message