Font embedding -- the intro

by Michael S. Kaplan, published on 2006/05/13 03:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2006/05/13/596774.aspx


I used to be very naive about how font licensing worked.

This is going back a few years, around the time just before I started the MSLU contract. My own website was supporting several different languages, including Hindi and Tamil, but not too many people had the fonts.

I did have the Font Properties Extension, and looking at the Windows 2000 version of MANGAL.TTF and LATHA.TTF, it was hard to miss the text on the Embedding tab:

 

The text seemed clear enough as to the meaning of Installable embedding allowed: "fonts may be embedded in documents and permanently installed on the remote system." So, without consulting with a lawyer, I added a download link for the fonts.

I think I mentioned that I was kind of naive about this stuff, right? I think I proved it, there....

There was not too much time before it was explained to me -- I received a cease and desist letter. :-)

Of course I immediately took the fonts down (it freaked me out a bit to be even unknowingly violating the rules in a way that would upset the people who were paying the bills!).

But I was still curious, so after I had taken them down I asked the person who sent me the mail what the text meant if it did not mean that they could be installed as .TTF files? Simon passed on a link to WEFT, the Web Emedding Fonts Tool, and I learned quite a bit about font embedding, eventually culminating in the font embedding work I described in They called it the 'Surrogate IME'.

Now the actual support for using embedded fonts was never too well described, until not too long ago when it was fully documented so that anyone could make use of these items -- the Font Embedding Reference. The introduction on that page explains what the functions in t2embed.dll are used for:

The Font Embedding Services Library provides a mechanism to bundle TrueType® and Microsoft OpenType fonts into a document or file. Typically, a document containing embedded fonts needs those fonts for rendering the document on another computer. Embedding a font guarantees that a font specified in a file will be present on the computer receiving the file. Some fonts, however, cannot be moved to other computers due to copyright issues limiting distribution.

With the information there about the functions, structures, and error messages, the story on how to use the ".EOT" embedded font files is provided!

I'll be digging into these functions a bit more in the not-too-distant future, to give some real examples of making use of this functionality in your applications....

(You can consider yourself warned)

 

This post brought to you by "ঈ" (U+0988, a.k.a. BENGALI LETTER II)


# Tom Gewecke on 13 May 2006 7:22 PM:

>I'll be digging into these functions a bit more in the not-too-distant >future, to give some real examples of making use of this functionality in >your applications....

This sounds interesting!  I'd be curious about any info you come across regarding whether font embedding can be used cross platform.  My impression is that Mac browsers  and maybe even Mac Office do not support it.

# Michael S. Kaplan on 14 May 2006 12:28 PM:

I don't think there is any agreement between different browsers about support of embedded fonts. Each browser has either their own solution, or no solution....

# Phylyp on 15 May 2006 6:17 AM:

> I'll be digging into these functions...
Ah, I look forward to this!

# John Bates on 15 May 2006 7:38 PM:

The reference is good, except that the required header (t2embapi.h) is nowhere to be found in any of the recent Platform SDKs.

From a Google search it appears to be part of IE (in a file listing of the stolen W2K sources).

# Michael S. Kaplan on 22 May 2006 4:41 PM:

Hi John,

I just found out there has been a little trouble with the process for getting the header file into the Platform SDK. It will be in a future release of the PSDK, and if people need it in the meantime, let me know and we can get it out to you....

# Christoph Lindemann on 1 Aug 2006 8:05 AM:

Hi Michael,

I would also be very much interested in the T2embapi.h header file.

Regards,
Christoph Lindemann
christoph [dot] lindemann [at] printassociates [dot] com

# Michael S. Kaplan on 1 Aug 2006 10:27 AM:

The header file and also the .LIB file are actually both available in the Windows SDK, at this point.

# Christoph Lindemann on 8 Aug 2006 7:03 AM:

Hi  Michael,

I have now downloaded and installed the latest Windows SDK "Microsoft Windows SDK for July CTP" (5472.2.1), and I am unable to find the file t2embapi.h, nor can I find any other header files which include the library function names like "TTEmbedFontEx" or "TTEmbedFont".

So if you could provide me with instructions on which unique SDK package I should download, to get my
hands on this elusive header file, they would be much appreciated. :)

# Mark Irving on 1 Apr 2008 11:57 AM:

TTEmbedFontEx is documented as available on Windows 2000 (all of NT, 2000, XP and Vista), but a call to GetProcAddress for it which succeeds on XP and Vista fails on 2000. Have I missed something such as a redistributable for 2000, or do I have to make do with TTEmbedFont? The latter would be a shame, since it will involve special-case code which only gets exercised on the relatively little-used Windows 2000.


Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

referenced by

2007/04/14 Rhymes with Amharic (a.k.a. How about a little breakfast embed, dear?)

2006/08/02 Insertion of an adendum to the intro to font embedding

go to newer or older post, or back to index or month or day