Re: Label in tray = P in the A



On 03/23/2010 09:06 PM, Sergey Udaltsov wrote:
> Thanks Matthias
> 
> How could I tell pango about hinting and AA settings? I could not find
> that in pango API, only in cairo....
> I will check the snapshot function...

Use pango_cairo_context_set_font_options() with the cairo_font_options_t
retrieved from gdk.

behdad

> Sergey
> 
> On 3/24/10, Matthias Clasen <matthias clasen gmail com> wrote:
>> On Tue, Mar 23, 2010 at 7:42 PM, Sergey Udaltsov
>>  <sergey udaltsov gmail com> wrote:
>>  > In GNOME 2.30, the kbd indicator moved to the tray. People are happy,
>>  > most of them. But ... there is a trouble.
>>  >
>>  > StatusIcons are not GTK widgets. And, as the result, the indicator has
>>  > to "emulate" gtk widget. That's a real pain, folks. The indicator
>>  > renders text to cairo, converts cairo to pixbuf, sets status icon from
>>  > pixbuf. Worst of all, the widget has to follow gtk style, font
>>  > rendering settings etc. What a pain.. Bug reports... Now, another one:
>>  > https://bugzilla.gnome.org/show_bug.cgi?id=611875.
>>  >
>>  > Here is my question of the day: why does the font size retrieved from
>>  > gtk style and provided to cairo give different results, comparing to
>>  > the gtk itself? I simply do not get that...
>>  >
>>  > I tried to use cairo_scaled_font_t - but the results are even worse,
>>  > the font gets smaller;)
>>  >
>>  > Thanks for any ideas,
>>
>>
>> Using the cairo 'toy' text api is almost never correct. I've just
>>  fixed a bunch of Indic text rendering bugs in various apps that were
>>  caused by use of this api instead of pango. You can have a look at
>>  pango/examples/cairosimple.c for how that might look.
>>  Or maybe you can just use gtk_widget_get_snapshot with a label widget.
>>
> _______________________________________________
> desktop-devel-list mailing list
> desktop-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/desktop-devel-list
> 


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