views:

52

answers:

2

I'm trying to find out if Embedded Open Type (.eot) files can be used in Silverlight. I found an older post that says they can't, but it's a few years old and given how fast SL has moved, I'm not sure if that has changed.

If so, how would they be used? As a <Glyph/> object or...?

+2  A: 

I don't think so. You can embed true type fonts fonts in your Silverilght app though. Expression Blend makes it easy to do, simply select a font and then tick the 'embed' box. You would of course need to make sure you met any font licensing requirements for fonts that you embed in your application.

The fonts are embedded as a zipped resource within your dll via a custom build action called 'BlendEmbeddedFont' and then referenced like this in your app:

<TextBlock Text="TextBlock" FontFamily="/SilverlightApplication12;component/Fonts/Fonts.zip#Segoe UI" />
Steve Willcock
+3  A: 

No. This is because Silverlight (like Flash) thinks of itself as an "application", not a "document". There's a lot of banter on this subject of font embedding vs. linking and web fonts. Silverlight incorrectly uses the word "embed" where it actually "links" instead.

Like any good technology though, it may be possible to reverse engineer an EOT file though - these security guys did it using IE: Reverse Engineering the Embedded OpenType Decompression. I don't think would be illegal in any way as the compression/decompression is a submission to W3C on http://www.w3.org/Submission/2008/SUBM-MTX-20080305/ (although it may make the font foundries a little angry). Or maybe you could look at this ttf-to-eot converter and do the reverse: http://code.google.com/p/ttf2eot/

Anyway, you have a lot of work ahead of you if you want to go down this path.

WinnerWinnerChickenDinner