The DWF Toolkit is used by Autodesk developers to read and write DWF files. Since DWF is an open format, Autodesk shares its C++ source code publicly on the web. It is available free from charge or royalties. As a result, there are many third party products available that support DWF.
Peer to peer support for the DWF Toolkit is provided in the autodesk.dwf discussion group.
Frequent discussion group participant, Software Engineer, and DWF Technical Evangelist, Ben Cochran, recently answered a question on embedding fonts in a DWF file. A fellow C++ programmer wanted to embed a font in his DWF file (W2D stream) from his program. By following the DwfIOTest sample program supplied with the DWF Toolkit, he could embed the samples\DWFToolkit\DwfIOTest\SampleSource\embeddedFont.tmp font file into his own DWF file; however, the embedded font did not display correctly in the Autodesk DWF Viewer. It was replaced by "Times New Roman." This discussion group user was surprised.
Ben pointed out:
A programmer cannot embed a raw true type font file into his DWF file. For example, simply inserting a TTF file found in the C:\Windows\fonts will not work.
To keep embedded fonts small (some can me several megabytes in size), DWF embedded fonts only contain the glyphs (data that represents the characters) used by a DWF section. In other words, the characters used on a sheet are embedded as part of the sheet. This occurs for each sheet that uses a font which the application identifies as needing to be embedded. An example of this based on AutoCAD settings is available on When does ClearType apply to my DWF?.
Particular to the question raised by the discussion group user, inserting the samples\DWFToolkit\DwfIOTest\SampleSource\embeddedFont.tmp files does not work, since it contains glyphs for the characters used for the sample DWF supplied as part of the DWF Toolkit - not glyphs for the characters used by the programmer's DWF file.
Fonts are only embedded into the W2D resource (2D stream) when writing DWF version 5.5 or older. For multisheet DWF files (version 6 and higher), the embedded font is a resource that is added to the DWF section. The font file is listed in the DWF manifest (resource table of contents).
Embedded font files used are created using the Microsoft Font Embedding Services Library. The documentation is located at http://windowssdk.msdn.microsoft.com/library/default.asp?url=/library/enus/Gdi/t2embed_Font_EmbeddingReference.asp. Programmers use this library to create embedded font files and then insert them into their DWF files using the DWF Toolkit.
The ability to programmatically keep files small, even in the case of embedded fonts, allows DWF to be part of electronic processes where transmission over the internet is necessary. This is another way DWF goes beyond the paper.