Most popular libraries not in the HP

Axel Simon Axel.Simon at in.tum.de
Sun Jul 18 10:03:15 EDT 2010


On Jul 18, 2010, at 0:06, Vo Minh Thu wrote:

> 2010/7/17  <briand at aracnet.com>:
>> On Sat, 17 Jul 2010 17:47:03 -0300
>> Felipe Lessa <felipe.lessa at gmail.com> wrote:
>>
>>> On Sat, Jul 17, 2010 at 4:39 PM,  <briand at aracnet.com> wrote:
>>>> On Sat, 17 Jul 2010 16:56:23 +0200
>>>> Axel Simon <Axel.Simon at in.tum.de> wrote:
>>>>
>>>>>
>>>>> As far as I can see, there is a gradual overhead of C libraries
>>>>> involved here. The Platform could ship the following subsets of
>>>>> Gtk2Hs:
>>>>>
>>>>> cairo
>>>>> cairo+glib+pango
>>>>> cairo+glib+pango+gio
>>>>> cairo+glib+pango+gio+gtk
>>>>>
>>>>> It's a question of how big the tar ball is and how much work it is
>>>>> to bundle the C libraries with the Platform.
>>>>>
>>>>> Cheers,
>>>>
>>>> That's why I voted for including just cairo.
>>>>
>>>> it's low overhead, high quality and gives your haskell install
>>>> access to cross-platform graphics capability.
>>>
>>> How useful is cairo without pango?
>>>
>>
>> Good question ! Fonts are still available even without pango, for
>> example freetype fonts are supported. I think there are limitations
>> but I can't remember exactly what.
>>
>> I've been down this road before, and I think that for basic use your
>> good-to-go without pango as long as you don't want to run your text
>> along a spiral path, or something like that.
>>
>> What I can't remember and what some of my example code doesn't  
>> reveal,
>> is whether text rotation is possible.  As long as you can scale and
>> rotate cairo withot pango would be ok, right ?
>
> Hi,
>
> Cairo is useful without pango: it is a vector drawing library (so this
> alone is useful) and has basic support for text. (Pango can do
> complicated stuff like right-to-left layout.)
>
> As a vector library, anything can be scaled, rotated, clipped, ...
> included text.
>

cairo alone does not allow you to set Unicode text. That's what Pango  
is all about. As a rule of thumb, cairo shouldn't be used if any user- 
supplied text has to be rendered. If only numbers and simple string  
constants need to be rendered, cairo can do this. The transformations  
available for the text are identical for cairo texts and pango texts.

Cheers,
Axel




More information about the Libraries mailing list