Re: Question about Gnome-Print-0.5 & Fonts



* Tom Cross <tomc kendeco com>:

Yet, I don't think it's a fault of the perl binding: seems more like a
bug of libgnomeprint to me. I'm looking into GtkSourceView in order to
write a binding for this widget, and they use "find_closest_from_full_name"
inside their code.

Hmm.  It's not working for me.  I changed the line to be:

my $font = Gnome2::Print::Font->find_closest_from_full_name("Times New
Roman 24");

and I'm still getting this result:

Found: Andale Mono Regular

Which is, I guess, also the first font also returned by the
Gnome2::Print::Font::list class method.

If find_closest_* methods fail in finding a font whose name it's the
passed one, I believe they return the first font inside the internal
fontlist. Since the bindings of Gnome2::Print::Font are pretty much
straightforward, it's all about libgnomeprint.

I've just tested this, using "Times New Roman 24", which returns,
instead, an "Agency FB" on my system; then, I've tried with "Monospace
Regular 10", which, instead, succeded.

+++

Try using the "list" class method to retrieve the font names that
libgnomeprint understands (list, as family_list and style_list returns
an array of strings), and try passing those names to the find* methods.

Regards,
 Emmanuele.

-- 
Emmanuele Bassi (Zefram)       [ http://digilander.libero.it/ebassi/blog ]
GnuPG Key fingerprint = 4DD0 C90D 4070 F071 5738  08BD 8ECC DB8F A432 0FF4



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