Re: [gtk-list] GdkFonts (or rather, fonts in X)



Hi Derek. The GtkExtra libraries includes a package called gtkpsfont.
Basically it allows you to render the 35 standard ps fonts as gdk fonts
and viceversa. It's kinda WYSYWYG, and gdk fonts are chosen to reproduce
the PS fonts look. The idea was borrowed from DiaCanvas and XFig, and it
works very well, as you can see in GtkPlot, and the postscript output. It
also allows you to add your
custom defined fonts in pairs (gdkfont, psfont). You have also the widget
GtkFontCombo that works exactly as the font combo in the commercial
applications, with combos to select the family and the size, and buttons
to select bold and italics. It's a toolbar subclass and you can add
more functions if you like, as underline button, justification, etc.
Take a look at testgtkfontcombo in the distribution. 
(http://magnet.fsu.edu/~feiguin/gtk)
Hope this helps,
<ADRIAN>

On Fri, 18 Feb 2000, Derek Simkowiak wrote:

> 
> 	I have some easy questions about using fonts in X (using Gdk).  
> I'm hoping this documentation is online somewhere, if so please just give
> me the URL.  I don't mean to seem like an idiot, but I've read what I
> could find and I'm new to font handling in X.
> 
> 	Regarding underlining, I take it that underlining is not part of
> the font and I need to draw the line underneath the text myself?
> 
> 	What are "TrueType" fonts (I've seen them on Microsoft computers
> before)?  Are they anyhow different from "scalable" fonts in X?  Is it
> possible to use "TrueType" fonts with Gdk?
> 
> 	Is it possible to display scaled fonts with anti-aliasing?  If so,
> how?
> 
> 	Let's say I let the user choose a font (by "family") to display
> text in my application.  Something like, "Babelfish" or "Brand New".  I
> also want them to be able to click on in "i" button to turn on italics, or
> a "b" button to turn on bold.  And they should be able to choose the size
> of the font.  Imagine something like Microsoft's Write program.
> 
> 	Now, on my system, I only have the following installed:
> 
> -macromedia-babelfish-medium-r-normal--0-0-0-0-p-0-iso8859-1 
> -macromedia-brand new-medium-r-normal--0-0-0-0-p-0-iso8859-1
> 
> 	I do not have "-i-" or "-b-" (italics or bold) versions of these
> fonts on my system.  Does that mean I cannot display an italicized version
> of this font?  I would have to remove both "Babelfish" and "Brand New"
> from the font drop-down list in my application?
> 
> 	Is it true that the *only* fonts I could let my user choose from
> would be those which have "-b-" and "-i-" versions installed on their
> system?  Is it like that with TrueType fonts?
> 
> 	And regarding scaling:  If the font type is not "scalable", does
> that mean the only font sizes the user can choose from are the ones they
> have installed?  Can I "scale" a bitmap font?  I've seen some really
> horrid (blocky, mis-sized) fonts in Netscape under Linux, implying that
> you could scale bitmap fonts but that they will look like crap.  Is that
> true?
> 
> 	Any help is greatly appreciated.
> 
> 
> Thank You,
> Derek Simkowiak
> dereks@kd-dev.com
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> 



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