tags:

views:

68

answers:

2

Is anyone familar with the .fntdata structure of an embedded font? This is used in PowerPoint 2007/2010 when embedding a font into a presentation (it is unlike .odttf that is used in Word 2007/Word 2010). Basically, I just want to convert this to a .ttf or .odttf file so it can be read by WPF/Silverlight applcations.

One page of the standard states the following:

c. The standard states that application/x-fontdata specifies that the font shall be stored as a bitmapped font (each glyph is stored as a raster image).

PowerPoint stores TrueType and OpenType fonts (Embed-Open-Type-Format, Micro-Type-Exp-Format) in parts of this type. Word does not read or write this content type.

Which is helpful to know that at least there is a direction to research, but I'm not sure where to go from here in terms of how to convert, if it's possible to convert, etc. (in .NET preferablly).

Right now, I can't even figure out how to read it. I've tried Microsoft Font Validator, but it says it is not a valid font.

To see this kind of font, go into PowerPoint 2007/2010, create one blank slide and add a text box. Add some text and change the font to "Chiller" (for example). Then, go to Orb (that round thing at top), click Save As... and then right next to the Save button click the Tools dropdown and then click on Save Options. Once the dialog pops, at the bottom choose Embed fonts in file (doesn't matter which radio below that you choose). Okay, now save and you're done. Now close the file, and find it in the location where you just saved it. Rename the extention from .pptx to .zip and then unzip it. In that folder, go to /ppt/fonts/ and you'll find a number of fonts there. Anyone of them will do.

Does anyone have any ideas?

+1  A: 
josh3736
Thanks for looking into this, it gives me a bit more knowledge than I had about an hour ago. Yeah, it is something I do need to figure out as it's for a converter application. But boy is it daunting!
Otaku
+2  A: 

I think I have close to the answer for you. Fonts of this type are of the Embedded Open Type (EOT) format that follows the PowerPoint Binary File Format spec. You can read more about the details of EOTs on the W3C's Embedded Open Type (EOT) file format.

I tested a few fonts against this, like Calibri Bold and Chiller, doing both the instructions you gave above for PowerPoint and then also using the Microsoft Web Embedding Fonts Tool (WEFT). They both create the same file sizes, but the encryption appears to be different - I'm guessing that WEFT is applying some different encryption due to how it builds the EOTs for specific websites. The W3C page above may have more details on encryption.

The good news is that, at least in a web page, you can use the PowerPoint-generated one "as is". In the PowerPoint embedded font I created of the Chiller font which is font1.fntdata when embedded, I just took that and created a web page using it and it worked just fine:

<html>
   <head>
      <title>Chill</title>
      <style type="text/css">
      @font-face{
        font-family: Chiller;
        src: url('font1.fntdata');
      }
      .Chiller{
        font-family: Chiller;
        font-size:60px;
        color:#000;
       } 
      </style>
   </head>
   <body>
      <div class="Chiller">Cold Beer</div>
      Free!
   </body>
</html>

I haven't gone so far as to test as to whether or not these can be used directly in WPF/Silverlight but at least now you know what you're dealing with.

Alison
o em jee! wow, i have had this issue for such a long time i had almost thought it would be impossible to solve. this is brilliant insight! let me run a few tests on this.
Otaku
worked great in HTML. still trying to figure out if it can be used in WPF/Silverlight, but this is huge. thank you!
Otaku