On Fri, Jun 5, 2009 at 7:15 PM, Harry Tormey <[email protected]> wrote:
>
> Hi All,
> I am trying to create a magnify effect with fonts in pyglet.
> I want to move me mouse over a letter and have it scale up.
>
>
> font = pyglet.font.load('Times New Roman', 16)
> letters = font.get_glyphs("alice")
>
> I want to apply a scaling effect to a given letter, glscale
> causes artifacts in the letter texture which is not good.
>
> #glscale letter while iterating through and drawing
> #letter[0].draw()
>
> One way I could do this would be to create multiple copies of
> the word I want to apply the effect to at different scales. I am
> lookin for a nicer solution than this. Any suggestions?
>
Bitmap fonts just don't scale nicely, so you either need to load the fonts
at multiple resolutions, or implement a new font renderer based on something
like Valves' distance-field rendering (an example of the rendering technique
exists in pyglet/experimental).
--
Tristam MacDonald
http://swiftcoder.wordpress.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---