----- Original Message -----
From: "Chris Lilley" <[EMAIL PROTECTED]>
To: "Batik Users" <[EMAIL PROTECTED]>
Sent: Friday, October 05, 2001 10:31 AM
Subject: Re: Text size


>
>
> 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.

Oh yeah?  Is this API in Batik?  How do I use it?


>
> >
> > 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
>
> --
> Chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to