Re: Is pango_break suitable for breaking text into lines?
- From: Behdad Esfahbod <behdad behdad org>
- To: Roman Beslik <rabeslik gmail com>
- Cc: gtk-i18n-list gnome org
- Subject: Re: Is pango_break suitable for breaking text into lines?
- Date: Sat, 17 Sep 2011 09:32:46 -0400
On 09/17/11 06:48, Roman Beslik wrote:
> Hello.
>
> Is "pango_break" suitable for breaking text into lines such that each line has
> width less then some number? I know I can achieve this with "PangoLayout" and
> "pango_layout_set_width", but can "pango_break" do the same? I can not find a
> function which sets line width.
>
> As "PangoLayout" is considered "high-level" and "pango_break" is considered
> "low-level", I guess that the low-level API should have this feature too. More
> common case is when a low-level API has features that a high-level API does not.
You get the output of pango_break, then walk over the clusters yourself and
decide where you want to break. That's the difference between highlevel and
lowlevel: using the lowlevel API you need to do some work yourself.
behdad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]