squeaky-pl / portable-pypy

Portable 64 bit x86 PyPy binaries for many Linux distributions.
Other
478 stars 38 forks source link

Missing fonts in tkinter... #4

Closed jedie closed 10 years ago

jedie commented 10 years ago

I notice that i have much less fonts available with PyPy portable (PyPy 2.3.1 with GCC 4.8.2) than with origin PyPy...

Have made a simple test script:

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)

Output with PyPy portable:

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

But the origin PyPy (PyPy 2.3.1 with GCC 4.6.3) listed the same fonts as CPython (95 font families) tested on Linux Mint 17

See also: https://bitbucket.org/pypy/pypy/issue/1866/tkinter-missing-fonts

squeaky-pl commented 10 years ago

Yes, portable version as the name says is portable, it links against minimal set of libraries and it doesnt link against any advanced font rendering engines. The goal of portable version is to provide working pypy binary out of the box and not integrate too much with the operating system you are running on. This way it can be portable. I won't fix this since it means integrating too much to the details of distribution you are running on. If you need those fonts you need version built specifically for your distribution.