I am trying to use Google fonts in a Visualforce page. Google offers three ways to use their fonts:
<link href="http://fonts.googleapis.com/css?family=Alef" rel="stylesheet" type="text/css">
Problems with above approaches:
- When I try this option, I get an error that
<link>needs to be closed with a
</link>tag (even when I enclose this and the CSS styling around
</head>[I've read that
<head>get ignored anyways when the VF page is interpreted into HTML.]). If I try to add a
</link>, the fonts don't display. Also, I've tried an
<apex:stylesheet value="http://fonts.googleapis.com/css?family=Alef">with no luck.
- This option doesn't work either. I've thought of trying to download the CSS and saving it to a static resource, but I haven't been able to accomplish this either.
Are there any ways to use option (1) or (2) that I'm missing?