Seite 1 von 1
GUI Schrift CPython vs. PyPy ?!?
Verfasst: Samstag 13. September 2014, 22:14
von jens
Warum rendern die Schriften anders mit PyPy?
Hier einmal CPython:
selber Programm code mir PyPy:

Re: GUI Schrift CPython vs. PyPy ?!?
Verfasst: Samstag 13. September 2014, 22:21
von BlackJack
@jens: Gegen eine andere Tk-Version gelinkt?
Re: GUI Schrift CPython vs. PyPy ?!?
Verfasst: Samstag 13. September 2014, 22:29
von jens
Keine Ahung.
Hab mal einen Test gemacht:
Code: Alles auswählen
try:
# Python 3
import tkinter
except ImportError:
# Python 2
import Tkinter as tkinter
root = tkinter.Tk()
font_families = root.tk.call("font", "families")
print("There are %i font families:" % len(font_families))
for font_family in font_families:
print("\t%s" % font_family)
Mit CPython2 und 3 habe ich hier 95 font families... Auf der selben machine mit PyPy2 aber nur ein paar:
Code: Alles auswählen
There are 21 font families:
fangsong ti
fixed
clearlyu alternate glyphs
courier 10 pitch
open look glyph
bitstream charter
song ti
open look cursor
newspaper
clearlyu ligature
mincho
clearlyu devangari extra
clearlyu pua
clearlyu
clean
nil
clearlyu arabic
clearlyu devanagari
standard symbols l
gothic
clearlyu arabic extra
Re: GUI Schrift CPython vs. PyPy ?!?
Verfasst: Sonntag 14. September 2014, 11:39
von jens
Re: GUI Schrift CPython vs. PyPy ?!?
Verfasst: Montag 15. September 2014, 19:11
von jens
Das Problem liegt bei PyPy-Portable. Beim offiziellen PyPy hat man die selben Fonts wie mit CPython, siehe:
https://github.com/squeaky-pl/portable-pypy/issues/4