Re: Overline for pango text?
- From: Stefan Salewski <mail ssalewski de>
- To: gtk-i18n-list gnome org
- Subject: Re: Overline for pango text?
- Date: Sat, 25 Sep 2010 02:33:06 +0200
On Thu, 2010-09-23 at 15:15 +0200, Stefan Salewski wrote:
> Hello,
>
> I have to draw some simple technical diagrams, I am using cairo (from
> Ruby rcairo) with interactive GTK drawing-area and PNG, PDF export.
> Currently I am using cairos toy text for text labels.
>
> My intention was to using pango now, but there seems to be still no
> support for overline/overbar (similar to existing underline), see
>
> http://en.wikipedia.org/wiki/Overline
>
> Will there come support for overline in pango soon, or what is the best
> solution to fake it?
>
OK, after some hours of research I may have a solution:
http://library.gnome.org/devel/pango/stable/pango-Layout-Objects.html#pango-layout-index-to-pos
pango_layout_index_to_pos() seems to give me a bounding box for each
character. So I can use Cairo's move_to() and line_to() functions to
draw the overbar/overline.
Best regards,
Stefan Salewski
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]