Fonts

P

phil

I'm cpmpletely lost on fonts.

I'm using Tkinter

I do medarial = '-*-Arial-Bold-*-*--24-*-*-*-ISO8859-1"
or Courier or Fixed in various sizes.

Works great on my RH 7.2

But a small embedded system Im working on, nothing seems to work,
almost everything falls back to a fixed 12

The X*4 fontpaths are the same and all the fonts,
75, 100, misc Speedo, PEX, etc are there.

There is something wrong with where the fonts are.
Help?
 
E

Eric Brunel

I'm cpmpletely lost on fonts.

I'm using Tkinter

I do medarial = '-*-Arial-Bold-*-*--24-*-*-*-ISO8859-1"
or Courier or Fixed in various sizes.

Works great on my RH 7.2

But a small embedded system Im working on, nothing seems to work,
almost everything falls back to a fixed 12

You should be able to use a font specification like (family, size [, style]), e.g ('helvetica', 24, 'bold'). This is the most portable way of specifying fonts (X11 font names may not work on some systems).

You can get the available font families on your system as seen by Tkinter/tk with:

from Tkinter import *
import tkFont
root = Tk()
print tkFont.families()

BTW - according to http://www.tcl.tk/man/tcl8.4/TkCmd/font.htm#M25 - the font family names 'helvetica', 'times' and 'courier' are guaranteed to work anywhere with tk/Tkinter.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,295
Latest member
EmilG1510

Latest Threads

Top