Discussion:
Microsoft Word Embedded Font
(too old to reply)
Jobbes
2007-02-24 01:36:42 UTC
Permalink
I've tried searching for a similar answer from this NG, but I couldn't
find one.

I am currently doing a project for school. Basically I'm trying to
rasterize to ascii glyphs taken from a truetype font file. I've been
doing some tests using Word documents and everything was going well
until I tried printing a word document sent by my friend to me having
embedded fonts.

I don't have the font in my machine, so I wouldn't know where to get
the font metrics when printing a microsoft word document. I also
encountered this for Adobe acrobat, but I was able to get the
information from the %windir%/TMP folder.

Any information on where Microsoft Word places a temporary font file,
if ever it does, is highly appreciated. Thank You.
Character
2007-02-24 01:57:06 UTC
Permalink
Post by Jobbes
I've tried searching for a similar answer from this NG, but I couldn't
find one.
I am currently doing a project for school. Basically I'm trying to
rasterize to ascii glyphs taken from a truetype font file. I've been
doing some tests using Word documents and everything was going well
until I tried printing a word document sent by my friend to me having
embedded fonts.
I don't have the font in my machine, so I wouldn't know where to get
the font metrics when printing a microsoft word document. I also
encountered this for Adobe acrobat, but I was able to get the
information from the %windir%/TMP folder.
Do you mean the metrics or the outlines themselves?
Post by Jobbes
Any information on where Microsoft Word places a temporary font file,
if ever it does, is highly appreciated. Thank You.
It doesn't. Embedded fonts in MS Office products are encrypted and
cannot be extracted. They're not even activated except for the
document that contains them. Incidentally; in Word 97 and earlier, if
the embedding flag was "installable" and the font wasn't already
installed, Word would install it right then and there! That loophole
has been tightly closed in more recent versions.

Adobe Acrobat Reader hasn't put embedded fonts into the temp directory
since Version 3.1 (and it's now up to Version 8). And even then, for
Type 1 fonts, only the font outlines (equivalent to the .pfb file)
were there. Font metrics (the .pfm file) aren't even embedded in pdf
documents in the first place. I'm not sure whether the font metrics
are included in embedded Truetypes.

I'm not sure what you mean by "rasterize to ASCII". As a phrase, it
doesn't make much sense.

- Character
Jobbes
2007-02-24 02:08:59 UTC
Permalink
Hi Character,
Post by Character
Do you mean the metrics or the outlines themselves?
Particularly the TTF font tables (i.e. name, glyf, etc. ).
Post by Character
It doesn't. Embedded fonts in MS Office products are encrypted and
cannot be extracted. They're not even activated except for the
document that contains them. Incidentally; in Word 97 and earlier, if
the embedding flag was "installable" and the font wasn't already
installed, Word would install it right then and there! That loophole
has been tightly closed in more recent versions.
If this is the case, then the only way to extract the font tables is
by using the WinApi GetFontData?
Post by Character
Adobe Acrobat Reader hasn't put embedded fonts into the temp directory
since Version 3.1 (and it's now up to Version 8). And even then, for
Type 1 fonts, only the font outlines (equivalent to the .pfb file)
were there. Font metrics (the .pfm file) aren't even embedded in pdf
documents in the first place. I'm not sure whether the font metrics
are included in embedded Truetypes.
Hmmm. I've tried printing a PDF file and I saw a file ***@R49.tmp
created in the TMP folder. I tried using the MS utility TTFDump on it
and I was able to extract the different font tables. I'm using Acrobat
Reader 7.0, btw.
Post by Character
I'm not sure what you mean by "rasterize to ASCII". As a phrase, it
doesn't make much sense.
Oh..sorry If I wasn't making any sense. All I wanted to say that I
wanted to display in ASCII a glyph outline.

ex.
Letter A

*
* *
* * * * *
* *
* *
Character
2007-02-24 05:56:38 UTC
Permalink
Post by Jobbes
Hi Character,
Post by Character
Do you mean the metrics or the outlines themselves?
Particularly the TTF font tables (i.e. name, glyf, etc. ).
OK. That's not the FontMetrics, which has a very specific definition,
although some of the tables include font metric data.
Post by Jobbes
Post by Character
It doesn't. Embedded fonts in MS Office products are encrypted and
cannot be extracted. They're not even activated except for the
document that contains them. Incidentally; in Word 97 and earlier, if
the embedding flag was "installable" and the font wasn't already
installed, Word would install it right then and there! That loophole
has been tightly closed in more recent versions.
If this is the case, then the only way to extract the font tables is
by using the WinApi GetFontData?
You've now gotten way beyond me! But where would you get the FontData
from if you can't grab the font file itself? My guess is that the font
is somewhere in ram, but never committed to a hard drive except
possibly in the page file, where nothing is accessible anyway.
Post by Jobbes
Post by Character
Adobe Acrobat Reader hasn't put embedded fonts into the temp directory
since Version 3.1 (and it's now up to Version 8). And even then, for
Type 1 fonts, only the font outlines (equivalent to the .pfb file)
were there. Font metrics (the .pfm file) aren't even embedded in pdf
documents in the first place. I'm not sure whether the font metrics
are included in embedded Truetypes.
created in the TMP folder. I tried using the MS utility TTFDump on it
and I was able to extract the different font tables. I'm using Acrobat
Reader 7.0, btw.
That's intriguing! Will have to play with that. I just tried, but it
must have disappeared too quickly
Post by Jobbes
Post by Character
I'm not sure what you mean by "rasterize to ASCII". As a phrase, it
doesn't make much sense.
Oh..sorry If I wasn't making any sense. All I wanted to say that I
wanted to display in ASCII a glyph outline.
Ahh... I see what you mean. That's a (common) mis-use of the word
ASCII, which is the American Standard Code for Information Interchange
... it's not a synonym for plain text.
Post by Jobbes
ex.
Letter A
*
* *
* * * * *
* *
* *
---- Character
Jobbes
2007-02-24 12:17:06 UTC
Permalink
Post by Character
You've now gotten way beyond me! But where would you get the FontData
from if you can't grab the font file itself? My guess is that the font
is somewhere in ram, but never committed to a hard drive except
Hahahaha...my bad. I have a tendency to mix words. But I don't know,
most programmers I know would normally treat the word ASCII as single
byte plain text characters, Unicode obviously a two-byte character
hehehe....I know that it's a misnomer but as long as we understand
each other, I guess it's ok.

Thanks for your help Character...I'll see what I can find from the
bookstore tom.

Loading...