Re: gdtk_draw_text deprecated , what use instead of it ?

On Sun, 2004-01-04 at 19:12, Paul Pogonyshev wrote:
... If you know your text is always just "a",
"b", "c" then yes you could avoid PangoLayout. However, if there were a
non-layout API people would use it in a lot of cases where it would be
broken, and the layout API should work fine for what you're doing.

Well, everything could be misused.  However, limiting is not a correct
way of preventing misuse, i'd say ;)  If nothing else, such a function
could probably stop the avalanche of questions about text drawing on
your mailing list.

Yes, because everyone would just use this function and their code would
be broken. Cases where it's safe to use this would be limited to
untranslated English, and even then things like fonts with ligatures
would break. I wouldn't even know how to document when it's safe to use.

Really this is not hard:

 layout = layout_new ();
 width = layout_get_width (layout);
 draw_layout (drawable, layout);
 layout_unref (layout);

I agree with you the docs could be improved, this is free software
though and it's up to someone to step up and make the improvements.


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