Does modern CSS allow for server-side font embedding?
Asked by
jballou (
2128)
June 15th, 2008
Observing members:
0
Composing members:
0
4 Answers
Depends on your definition of modern.
Here’s the code:
<style type=“text/css”>
@font-face {
font-family: “My Font”;
src: url(myfont.ttf);
}
.header {
font-family: “Ace Crikey”;
}
</style>
However, it is my understanding that this validates under CSS 2.0, and will validate under CSS 3.0, but does not validate under CSS 2.1.
EDIT: This page looks like it offers some solutions to the compatibility problem.
The answer is no. CSS 2.1 removed embedded font support due to copyright complaints, so browsers haven’t really implemented it. It’s supposed to come back in CSS 3, but I wouldn’t hold my breath.
While not ideal.. Have you looked into sIFR.
You can do it with PHP if you have to as well. It’s really a snap, but it takes away C& because it’ll render as an image :/
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.