sorccu / cufon

Fast text replacement with canvas and VML - no Flash or images required.
http://cufon.shoqolate.com
MIT License
2.09k stars 237 forks source link

font size animations fail #242

Closed edzjins closed 12 years ago

edzjins commented 12 years ago

Hello! I'm developing a website with a quite tricky menu - on hover the font size is being animated with jQuery.animate(), and the font size is animated from 18px to 22px. However, when I hover the menu it doesn't hover, or change at all. Have I just stumbled upon a bug which is just too much pain in the ass and/or can't actually be fixed, or is this somehow useful information?

Thanks in advance!

sorccu commented 12 years ago

Hi,

Unfortunately your hunch is correct, it is not possible to implement this (efficiently). You can, however, animate the zoom property (assuming you're OK with somewhat limited browser support). Sadly, the text will quite likely look a bit blurry. Therefore you might want to set the initial font size to 22px and zoom to 0.8 (~18/22), and then make it larger by animating zoom to 1. So basically, if you want to do it, there is a way, but it's a bit of a pain :)

Simo