Font Embedding
Within a WordprocessingML document, font embedding refers to a process in which the some or all of the fonts used in the current document are included in that document such that it can be guaranteed that they are available for use when the document is subsequently opened.
Embedded fonts are stored in an Embedded Font part within the package.
When a font is embedded within a WordprocessingML document, it shall be obfuscated to prevent it from being used outside of this document. This obfuscation shall be done using the following algorithm:
Generate a GUID, which will be used and stored as the obfuscation key
Reverse the order of the bytes in the GUID (i.e. Big Endian ordering)
XOR the value with the first 32 bytes of the binary: once against 0-15, once against 16-31
Store the resulting file in the document, and store the obfuscation key in the
@fontKey
attribute
To obfuscate this font for storage:
Generate a GUID (e.g.
001B70DC-AA60-4AD5-90EC-18A0948E1EAE
)Reverse its order (e.g.
AE1E8E94-A018-EC90-D54A-60AADC701B00
)XOR the GUID with the first and second 16 bytes
The resulting 32 bytes would be:
To retrieve an obfuscated font for viewing the content of this document only, repeat the procedure above to retrieve the original font.