... on web pages directly. There are actually two common solutions here:
1) Dynamic font. This requires browser support, which is not very popular nowadays.
2) Image. Depending on the font and the effect you want on the font, choose JPEG or GIF smartly. For gradient colours (and relatively large image size), use JPEG; otherwise, GIF will be a better choice. (PNG also not bad, supporting both the cases, just that PNG is not supported on older generation of browsers and is slightly larger to GIF sometimes.)