Problem with giant font sizes in tkinter

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Feb 10 07:59:13 CET 2011


I have a tkinter application under Python 2.6 which is shows text in a 
giant font, about twenty(?) times larger than expected.

The fonts are set using:

titlefont = '-Adobe-Helvetica-Bold-R-Normal-*-180-*'
buttonfont = '-Adobe-Helvetica-Bold-R-Normal-*-140-*'
labelfont = '-Adobe-Helvetica-Bold-R-Normal-*-140-*'

On one PC (Fedora), the text is displayed fine. Running xlsfonts gives me 
this:

$ xlsfonts -fn '-Adobe-Helvetica-Bold-R-Normal-*-140-*'
-adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso10646-1
-adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso8859-1
-adobe-helvetica-bold-r-normal--20-140-100-100-p-105-iso10646-1
-adobe-helvetica-bold-r-normal--20-140-100-100-p-105-iso8859-1



On a second PC (Ubuntu), the text is displayed in HUGE letters and I get 
this from xlsfonts:

$ xlsfonts -fn '-Adobe-Helvetica-Bold-R-Normal-*-140-*'
-adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso10646-1
-adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso10646-1
-adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso8859-1
-adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso8859-1
-adobe-helvetica-bold-r-normal--20-140-100-100-p-105-iso10646-1
-adobe-helvetica-bold-r-normal--20-140-100-100-p-105-iso10646-1
-adobe-helvetica-bold-r-normal--20-140-100-100-p-105-iso8859-1
-adobe-helvetica-bold-r-normal--20-140-100-100-p-105-iso8859-1


I don't know how to diagnose or fix the problem. What should I do to fix 
this problem?


-- 
Steven



More information about the Python-list mailing list