Hey there,

I'm having a lot of trouble with the font api.

Basically it comes down to this:

1) If you have a font, and you call add_file() on it, you have no idea what 
the associated font name is.

2) If you call either pyglet.font.load() for 
pyglet.font.base.Font.have_font(), these return a font / true in all 
circumstances.

The only way I've found to determine if we're successfully using a font or 
not is:

        pyglet.font.add_file(path)
        font = pyglet.font.load(name=font_name, size=1)
        span = font.ascent + font.descent
        if span > 5:
          print("ID %s did not match a known font name" % self.font)

This seems absolutely ridiculous to me. 

I mean, what the heck is this nonsense? 

    @classmethod
    def have_font(cls, name):
        '''Determine if a font with the given name is installed.

        :Parameters:
            `name` : str
                Name of a font to search for

        :rtype: bool
        '''
        return True

!!! Why does the call even exist? 

I appreciate loading fonts cross platform is tricky, and I suppose it's 
vaguely nice having access to the default system fonts, but this api is 
really really hard to use.


Am I doing something wrong?
Why is using fonts so difficult?

~
Doug.

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to