GUI Schrift CPython vs. PyPy ?!?

Fragen zu Tkinter.
Antworten
Benutzeravatar
jens
Python-Forum Veteran
Beiträge: 8502
Registriert: Dienstag 10. August 2004, 09:40
Wohnort: duisburg
Kontaktdaten:

Warum rendern die Schriften anders mit PyPy?


Hier einmal CPython:
Bild




selber Programm code mir PyPy:
Bild

GitHub | Open HUB | Xing | Linked in
Bitcoins to: 1JEgSQepxGjdprNedC9tXQWLpS424AL8cd
BlackJack

@jens: Gegen eine andere Tk-Version gelinkt?
Benutzeravatar
jens
Python-Forum Veteran
Beiträge: 8502
Registriert: Dienstag 10. August 2004, 09:40
Wohnort: duisburg
Kontaktdaten:

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

GitHub | Open HUB | Xing | Linked in
Bitcoins to: 1JEgSQepxGjdprNedC9tXQWLpS424AL8cd
Benutzeravatar
jens
Python-Forum Veteran
Beiträge: 8502
Registriert: Dienstag 10. August 2004, 09:40
Wohnort: duisburg
Kontaktdaten:


GitHub | Open HUB | Xing | Linked in
Bitcoins to: 1JEgSQepxGjdprNedC9tXQWLpS424AL8cd
Benutzeravatar
jens
Python-Forum Veteran
Beiträge: 8502
Registriert: Dienstag 10. August 2004, 09:40
Wohnort: duisburg
Kontaktdaten:

jens hat geschrieben:Hab mal ein ticked eröffnet: https://bitbucket.org/pypy/pypy/issue/1 ... sing-fonts
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

GitHub | Open HUB | Xing | Linked in
Bitcoins to: 1JEgSQepxGjdprNedC9tXQWLpS424AL8cd
Antworten