public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
* font manipulation?
@ 2000-04-11 12:28 Stephan Houben
  2000-04-12 12:09 ` Marius Vollmer
  0 siblings, 1 reply; 2+ messages in thread
From: Stephan Houben @ 2000-04-11 12:28 UTC (permalink / raw)
  To: guile-gtk

Hello list,

I have some questions about fonts:
1. Is there a way to get a list of all available fonts?
2. Is there a something in guile-gtk like gtk's gtk_string_extent?

Thanks!

Stephan Houben

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: font manipulation?
  2000-04-11 12:28 font manipulation? Stephan Houben
@ 2000-04-12 12:09 ` Marius Vollmer
  0 siblings, 0 replies; 2+ messages in thread
From: Marius Vollmer @ 2000-04-12 12:09 UTC (permalink / raw)
  To: guile-gtk

Stephan Houben <stephan@pcrm.win.tue.nl> writes:

> Hello list,
> 
> I have some questions about fonts:
> 1. Is there a way to get a list of all available fonts?

Probably.  You might look at the implementation of
GtkFontSelectionDialog in Gtk+ to find out more.

> 2. Is there a something in guile-gtk like gtk's gtk_string_extent?

Not yet, but it can be added like so

    (define-func gdk_string_extents
      (none (values (lbearing rbearing width ascent descent)))
      ((GdkFont font)
       (string string)
       (int lbearing)
       (int rbearing)
       (int width)
       (int ascent)
       (int descent)))

    guile> (gdk-string-extents "fixed" "Hi!")
    (0 15 18 9 0)

I have just done this, it should be available in CVS now.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-04-12 12:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-11 12:28 font manipulation? Stephan Houben
2000-04-12 12:09 ` Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).