Rendering text with specified width
- From: Lars Ræder <larsrc gmail com>
- To: gtk-i18n-list gnome org
- Subject: Rendering text with specified width
- Date: Sun, 13 Mar 2005 05:40:16 -0800
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]