I don't know if this is a well known technique, but I couldn't find much info about it on these forums when I was first playing with the idea... I thought I'd give my findings out there so if anyone else is looking for the same idea, this might help...
What I was trying to do is have specific fonts in my store for specific functions. It seems that any font I want on my store must be on the end-users computer to see it (or else it reverts to the default font-family). The option I came up with is to store fonts locally on the server, and when a customer views the page, the font is automatically shown on their web browser, no matter if they have it in their font list or not.
Here's what I did -
1: Upload your font to includes/templates/YOUR-TEMPLATE/css folder
(in my test case, I downloaded a font called 'bromello.ttf' from one of the many font sites and uploaded it as 'bromello.ttf')
2: Edit your stylesheet.css
I added this code at line 154, but it's probably not critical where it goes.
Code:
@font-face {
font-family: 'MyTestFont';
src: url('bromello.ttf')
}
3: I added a new 'h9' to the stylesheet, so I could easily call up the new font.
... at line 159
Code:
h9 {
font-family: MytestFont;
color: black;
font-size: 5em;
}
Wherever you want your special font (product description?), do something like this -
Code:
<h9>This is my special Font!</h9>
...and it will be shown in your special font on your customer's screen
I hope this has helped someone else
(and, as a post note: I'm not using this for now - it didn't quite do what I was looking for so I'm back to the drawing board)
John
Bookmarks