Prob. Anyone know how to reference an embedded font without scripting ? (as most people have scripting disabled to avoid harmful scripts being run)
Background. I have an editable font and have used Microsofts WEFT utility to create the .eot file (as detailed in the great article Using stationery and specifying a full path URL to the .eot file the html email works fine, but as the recipient wouldn't have this file you have to embed it and it gets a unique id which in turn is referenced by script and thus don't work. Phew.
Code examples:-
*Working Code (scripting is needed for the statement src: url("&Fount1&");")
<body>
<p><img id="efont1"
src="file:///C:/Working/speciale.eot" style="display: none"></p>
<script language="VBScript">
'
' VBScript Example to write css STYLE
'
Dim Fount1, texxt1
Dim lines(11)
'
texxt1="text/css"
Fount1=efont1.src 'This is the id name in the IMG spec
'
lines(1)="<head/>"
lines(2)="<STYLE TYPE="&texxt1&">"
lines(3)="<!--"
lines(4)=" @font-face {"
lines(5)=" font-family: Special Font;"
lines(6)=" font-style: normal;"
lines(7)=" font-weight: 700;" 'Changing this value is optional
lines(8)=" src: url("&Fount1&");"
lines(9)=" }"
lines(10)="-->"
lines(11)="</STYLE></head>"
'
' Now write the STYLE
'
for i=1 to 11
Document.Writeln lines(i)
next
'
</script>
<p><font face="Special Font">This is text in Special Font</font></p>
</body>
*Not working code (cid refences embedded font image)
<body>
<p><img id="efont1"
src="cid:453142012@02032004-2657" style="display: none"></p>
<STYLE>
@font-face { font-family: Special font;font-style: normal;font-weight: 700;src: url("efont1");}
</STYLE>
<p Style="font-family: Special Font">This is text in Special Font</p>
</body>
Any clues or pointers much appreciated.
Background. I have an editable font and have used Microsofts WEFT utility to create the .eot file (as detailed in the great article Using stationery and specifying a full path URL to the .eot file the html email works fine, but as the recipient wouldn't have this file you have to embed it and it gets a unique id which in turn is referenced by script and thus don't work. Phew.
Code examples:-
*Working Code (scripting is needed for the statement src: url("&Fount1&");")
<body>
<p><img id="efont1"
src="file:///C:/Working/speciale.eot" style="display: none"></p>
<script language="VBScript">
'
' VBScript Example to write css STYLE
'
Dim Fount1, texxt1
Dim lines(11)
'
texxt1="text/css"
Fount1=efont1.src 'This is the id name in the IMG spec
'
lines(1)="<head/>"
lines(2)="<STYLE TYPE="&texxt1&">"
lines(3)="<!--"
lines(4)=" @font-face {"
lines(5)=" font-family: Special Font;"
lines(6)=" font-style: normal;"
lines(7)=" font-weight: 700;" 'Changing this value is optional
lines(8)=" src: url("&Fount1&");"
lines(9)=" }"
lines(10)="-->"
lines(11)="</STYLE></head>"
'
' Now write the STYLE
'
for i=1 to 11
Document.Writeln lines(i)
next
'
</script>
<p><font face="Special Font">This is text in Special Font</font></p>
</body>
*Not working code (cid refences embedded font image)
<body>
<p><img id="efont1"
src="cid:453142012@02032004-2657" style="display: none"></p>
<STYLE>
@font-face { font-family: Special font;font-style: normal;font-weight: 700;src: url("efont1");}
</STYLE>
<p Style="font-family: Special Font">This is text in Special Font</p>
</body>
Any clues or pointers much appreciated.