Re: Rendering text with specified width



Hi Lars,

This is not answering your questions, but just to let you know that
the situation isn't as bad as you described it below regarding scaling
of bitmaps. If there is no support in pango (which I am not sure about)
then you may always turn the fonts into beziergon outlines through
code similar to what is inside my program paps (which has already
been used within dia). The beziergons are obviously scalable. You
then just have to render these at the required size. Since beziergons
are already supported in dia, that should solve the problem.

Regards,
Dov

On Sun, Mar 13, 2005 at 05:40:16AM -0800, Lars Ræder wrote:
> Hi!
> 
> We're trying in Dia to render text at a specifc width (to fit within
> boxes) regardless of zoom factor.  Since fonts don't scale linearly,
> this is kinda tricky.  Is there a standard way in Pango now to say
> "render this text at this width exactly" (possibly just for a single
> line at a time)?
> 
> I was hoping to use pango_layout_set_width(layout, my_width) and
> pango_layout_justify(layout, TRUE), but with
> pango_layout_set_wrap(layout, -1).  Would this force the width, or is
> it bogus?  Which version of Pango would be required for it to work
> (>1.4, it seems from the API docs)?
> 
> I know forcing a width will mess with all kinds of kerneling and pixel
> aligning and stuff, but if Pango can't do it for us, we'll end up with
> worse things like rendering to a bitmap and scaling that.  So I really
> hope Pango can help us.
> 
> Thanks,
> -Lars
> _______________________________________________
> gtk-i18n-list mailing list
> gtk-i18n-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-i18n-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]