Index

PowerDoc Objects

Font Data

Overview

This object holds an entire outline font file. It is used for storing (embedding) D-Type, TrueType, OpenType, Type 1, PostScript Type 3 or Bare CFF fonts in the document.

Designated Rendering Function: NONE

None

Properties

pdFontDataFormat (1070)   PD_WORD_SIGNED

Font format.

Supported values:

0 = D-Type Font Format (.dtf)

1 = TrueType or OpenType with TrueType outlines (.ttf) or TrueType Collection (.ttc) [Apple Mac ASCII Encoding]

3 = TrueType or OpenType with TrueType outlines (.ttf) or TrueType Collection (.ttc) [Windows Unicode Encoding]

6 = OpenType (.otf) containing Type 2/CFF outlines [Apple Mac ASCII Encoding]

5 = OpenType (.otf) containing Type 2/CFF outlines [Windows Unicode Encoding]

2 = Adobe Type 1 (.pfb or .pfa) [Adobe Standard Encoding]

7 = Adobe Type 1 (.pfb or .pfa) [ISO Latin Encoding]

8 = Adobe Type 1 (.pfb or .pfa) [Synthesized Windows Unicode Encoding]

11 = Adobe Type 3 PostScript (.ps) [ISO Latin Encoding] - must obey D-Type's strict parsing rules

12 = Adobe Type 3 PostScript (.ps) [Synthesized Windows Unicode Encoding] - must obey D-Type's strict parsing rules

14 = Bare CFF (.cff) [Adobe Standard Encoding]

15 = Bare CFF (.cff) [ISO Latin Encoding]

16 = Bare CFF (.cff) [Synthesized Windows Unicode Encoding]

All the above values are inherited from D-Type Standard Engine. See D-Type Standard Engine Manual for more details.

pdFontDataBytes (1071)   PD_HEX

Font file.

pdFontDataNumber (1072)   PD_WORD_SIGNED

Font collection number.

Some font files are actually font collections (e.g. D-Type or TrueType Collections) which contain multiple fonts in the same file. Font collection number identifies a font in the font collection. Set the font collection number to 0 to open the first font in the collection. If this value is too large, the font will not open.

pdFontDataHinting (1098)   PD_BYTE_UNSIGNED

Font Hinting.

Tells the engine whether to apply hinting to the font. Hinted fonts typically produce better looking and sharper output, however they are somewhat slower to process than non-hinted fonts (especially if they contain many complex glyphs such as in Chinese/Japanese/Korean fonts).

Supported values:

0 = don't apply hinting to the font
1 = apply native hinting when available, otherwise apply auto-hinting to the font
2 = apply auto-hinting to the font
3 = apply native hinting when available, otherwise apply compact auto-hinting
4 = apply compact auto-hinting exclusively

All the above values are inherited from D-Type Standard Engine. See D-Type Standard Engine Manual for more details.

pdFontDataCaching (1099)   PD_BYTE_UNSIGNED

Font Caching.

Tells the engine how to cache the font. This parameter will be described more thoroughly in the future. For now, set this parameter to 0 which identifies a standard caching scheme. This caching scheme ensures a good performance with all supported font formats.

Example

C/C++

DT_ID_SLONG obj[1];

obj[0] = pdObjAdd(pd, 0, "Font Data - Arial TrueType Font");

/* Properties for object 5 */
pdPropAdd(pd, obj[5], pdFontDataFormat, "3", PD_WORD_SIGNED);
pdPropAdd(pd, obj[5], pdFontDataAdvancedFlags, "1", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[5], pdFontDataHintingFlags, "1", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[5], pdFontDataBytes,
"0001000000170100000400704453494780B1E5C2000412DC0000140020006FE
00FF010001080109010A010B010C010D010E010F011001110112011301140115
0116011701180119011A011B011C011D011E011F012001210122012301240125
0126012701280129012A012B012C012D012E012F013001310132013301340135
0136013701380139003AB03AD03AF03B103B503B903BD03C103C503C903CD03D
... many hex values omitted ...
103D503D903DD03E103E503E903ED03EF03F103F503F703F903FB00040009000
10008000100580002000A00360005000C0014001A00200026037F000303E003E
10347000202F20348000202F30349000202F4034A000202F5034B000202F6000
1000102F7000000010000000161726162000C000600000000000502F0031B046
7046804690000", PD_HEX);

INTEGRAL DSL

/* Lambda shortcuts */

local o = @(label = "") CDTObj(::my.doc, label); /* to make object */
local p = @(id, str, len = PD_DEFAULT) CDTProp(id, str, len); /* to add property - general */
local s = @(id, str) CDTPropStr(id, str); /* to add property - string */
local i = @(id, num) CDTPropInt(id, num); /* to add property - integer */
local l = @(id, obj) CDTLink(id, obj); /* to add link */

/* Objects */

local obj_0 = o("Font Data - Arial TrueType Font");

obj_5 + i(pdFontDataFormat, 3);
obj_5 + i(pdFontDataAdvancedFlags, 1);
obj_5 + i(pdFontDataHintingFlags, 1);
obj_5 + p(pdFontDataBytes, "0001000000170100000400704453494780B1E5C2000412DC0000140020006FE00FF010001080109010A010B010C010D010E010F0110011101120113011401150116011701180119011A011B011C011D011E011F0120012101220123012401250126012701280129012A012B012C012D012E012F0130013101320133013401350136013701380139003AB03AD03AF03B103B503B903BD03C103C503C903CD03D ... many hex values omitted ... 103D503D903DD03E103E503E903ED03EF03F103F503F703F903FB0004000900010008000100580002000A00360005000C0014001A00200026037F000303E003E10347000202F20348000202F30349000202F4034A000202F5034B000202F60001000102F7000000010000000161726162000C000600000000000502F0031B0467046804690000");
 

Index