font-name/font-family inconsistency or a bug?

46 views
Skip to first unread message

anatoly techtonik

unread,
Sep 3, 2012, 2:30:48 AM9/3/12
to pyglet...@googlegroups.com
Does anybody know why this works:

font_family = 'Monospace'
render = pyglet.text.Label('A', font_name=font_family)

And this doesn't:

font_family = ['Monospace']
render = pyglet.text.Label('A', font_name=font_family)

text.Label() doc says:
`font_name` : str or list
Font family name(s). If more than one name is given, the
first matching name is used.

I couldn't dig where this bug coming from. Maybe anybody already knows?
pyglet HEAD, Linux
--
anatoly t.

Nathan

unread,
Sep 4, 2012, 1:26:49 AM9/4/12
to pyglet...@googlegroups.com
On Mon, Sep 3, 2012 at 10:22 AM, Zim the Fox <eche...@gmail.com> wrote:
Hello, Anatoly.

I am using an old (couple of months) version of Pyglet 1.2 alpha and your example works perfectly. So, while I don't know what causes the bug, it seems to be fixed in the up coming version. :)


Er, but he already said he was using "pyglet HEAD", which I would guess means the tip of the hg repo, which _isn't_ working for him.  :-/

~ Nathan

 

anatoly techtonik

unread,
Sep 4, 2012, 11:15:08 AM9/4/12
to pyglet...@googlegroups.com
Can you do 'hg clone' and try current pyglet version on Linux? I am pretty sure that Linux (Freetype) have_font() function is broken, but I don't know hot to fix it. Freetype documentation looks too complicated.


On Monday, September 3, 2012 7:22:27 PM UTC+3, Zim the Fox wrote:
Hello, Anatoly.

I am using an old (couple of months) version of Pyglet 1.2 alpha and your example works perfectly. So, while I don't know what causes the bug, it seems to be fixed in the up coming version. :)

Cheers,
Zim

Nathan

unread,
Sep 4, 2012, 3:54:07 PM9/4/12
to pyglet...@googlegroups.com
On Tue, Sep 4, 2012 at 9:15 AM, anatoly techtonik <tech...@gmail.com> wrote:
Can you do 'hg clone' and try current pyglet version on Linux? I am pretty sure that Linux (Freetype) have_font() function is broken, but I don't know hot to fix it. Freetype documentation looks too complicated.

Anatoly, I just did this on a two completely-up-to-date VMs of Ubuntu 12.04 (one VM is 32-bit and the other is 64-bit) with all updates installed.  It works with ['Monospace'] on both VMs!

Perhaps you need to update your system?  Or perhaps it is the difference between a hardware- and software-based rendering stack? (I would assume my VMware VM is using software rendering).

~ Nathan 
Reply all
Reply to author
Forward
0 new messages