changing fonts?

jyoung79 at kc.rr.com jyoung79 at kc.rr.com
Sun Dec 9 17:25:00 EST 2007


Hi Doug,

> I'm not *that* familiar with the Terminal program on OS/X, but regardless
> perhaps I can point out a possibly useful path to explore...

Wow!!  Thanks for all this info!!  This is some good stuff!!!  :-)

Well, I got to experimenting with a lot of different stuff, as well as doing a lot
of research on the net, and I think I've found what I was looking for.  It's not
perfect, but I'm thrilled I was able to do this!  I never could find anything on
changing the actual font (or character set) on-line, and looking through the
man pages I couldn't figure out if it was possible there either, although I'm
still new to this stuff so a lot of it could just be my ignorance.

I took Greg's idea and found this web-site:

http://www.unicode.org/charts/PDF/U0370.pdf

which gave me all the unicode characters for the Greek font.  I wrote a simple Python script to test this (only on Mac OS X 10.5 at the moment):

----------
import os

os.system("clear")
print '\033[36m', u'\u03B1\u03C1\u03C4\u03BF\u03C2', '\033[37m', 'This is
the Greek word for "Bread"', '\033[0m'
----------

As you can see, I also added some escape sequences to color the text in the
Terminal window as well.  And it works great!!  Note that I have Terminal
set up with the 'Monaco' font.

Thanks again, Greg and Doug, for your incredible help of not only steering
me in the right direction, but also teaching me new techniques which are
definitely going to come in handy!  :-)

Jay



More information about the Python-list mailing list