Pomax / lib-font

This library adds a new Font() object to the JavaScript toolbox, similar to new Image() for images
MIT License
734 stars 72 forks source link

Random fontFamily equal for all fonts #14

Closed asbjornenge closed 11 years ago

asbjornenge commented 11 years ago

When using Font.js with multiple fonts without settings the fontFamily, since the random fontFamily is set directly on the prototype, all objects and in turn styleNode's will have the same font-family. This is not optimal if your font's are actually not in the same family.

This commit will set a new random fontFamily for er each new Font() object. I'm not sure about the intent of the random title, but this way we can at least tell them apart.