Skip to content Accesskey=4Skip to sub-navigation Accesskey=3View our Accessibility Options MIT Information Systems Home About IS&T Contact IS&T Site Map Search Advanced Search
Getting StartedGetting Services by Topic or Alphabetically Getting Help

On This Page

[Help]

  

Quick Links

Top Level

Related Links

Ask OLC a question

Athena Consulting Homepage

Helpdesk Stock Answers (for Mac/PC questions)


DEFINING Fonts for Zephyr

Each of the default fontfamilies ("times", "helvetica", and "courier") has 4
fontfaces associated with it: bold, italic, bolditalic, and roman.  ("roman"
means that there is no bold or italic applied to the font)

Each also has 3 sizes associated with it: small, medium, and large.  This
allows you to put:

	print  "@large("+$sender+")"

in your .zwgc.desc file, for example, to print the sender's name in a larger
font than normal.  You can also send someone a zwrite like this:

	hi, this message has @large(large words) in it and
	@small(small words) in it, as well as normal (medium)
	sized words...

So, in order to "fully" define a fontfamily for zwgc, you need to find twelve
X fonts that will complete your fontfamily (3 sizes times 4 faces), and insert
their names into your .Xresources file.  For example, the standard "times"
fontfamily is defined like so:

    ! (This is taken from the file:  /usr/athena/share/zephyr/zwgc_resources  )
    !
    ! The following is the adobe-times font family.  Availiable sizes are
    ! 80, 100, 120, 140, 180, and 240.  This family used to be times-roman.
    !
    *fontfamily.times.small.roman:          *adobe-times-medium-r-*-80-*-p-*
    *fontfamily.times.small.bold:           *adobe-times-bold-r-*-80-*-p-*
    *fontfamily.times.small.italic:         *adobe-times-medium-i-*-80-*-p-*
    *fontfamily.times.small.bolditalic:     *adobe-times-bold-i-*-80-*-p-*

    *fontfamily.times.medium.roman:         *adobe-times-medium-r-*-120-*-p-*
    *fontfamily.times.medium.bold:          *adobe-times-bold-r-*-120-*-p-*
    *fontfamily.times.medium.italic:        *adobe-times-medium-i-*-120-*-p-*
    *fontfamily.times.medium.bolditalic:    *adobe-times-bold-i-*-120-*-p-*

    *fontfamily.times.large.roman:          *adobe-times-medium-r-*-240-*-p-*
    *fontfamily.times.large.bold:           *adobe-times-bold-r-*-240-*-p-*
    *fontfamily.times.large.italic:         *adobe-times-medium-i-*-240-*-p-*
    *fontfamily.times.large.bolditalic:     *adobe-times-bold-i-*-240-*-p-*

You could define your own fontfamily named "foo" by replacing "times" with
"foo" in the twelve lines above.  Assuming you have defined a fontfamily
(let's use the name "foo" as an example), you can then put:

	print  "@foo("+$sender+")"

in your .zwgc.desc file, for example, to print the sender's name in your newly
defined "foo" fontfamily.

If you don't want to have to find twelve fontfaces that work together, you can
do just this:

    zwgc.fontfamily.blah.Size.Face:	*adobe-times-bold-i-*-240-*-p-*

and then put:

	print "@blah("+$sender+")"

to print out the sender in the "blah" font you defined.  The problem
with this, though, is that since there is only one font face and size
defined, you can't use the formatting commands like "@b", "@i", etc. on
it.  Those commands would be ignored, and so something like:

	@blah(@i(this) is @b(a) test)

would come out in just the "blah" font, without the bolding and italics done
to it.

Of course, once you have changed your .Xresources file, you will have to
reload the X Resource DataBase manager by typing:

	xrdb  ~/.Xresources

and then you'd have to kill and restart your zwgc in order to see the new
fonts (or just wait until next time you log in).

Changes to the .zwgc.desc file, on the other hand, can be read in as soon as
you save out that file, by typing:

	zctl wg_read

For more information about X fonts, please refer to the stock answer on X
fonts under the XWINDOWS topic. 

MIT Home | Getting Started | Getting Services | Getting Help | About IS&T | Accessibility
Ask a technology question or send a comment about this web page.