Index

PowerDoc Objects

Typography (For PowerFonts)

Overview

This object represents a set of typographic parameters that apply to PowerFonts. It is one of the elementary PowerDoc objects; many higher-level objects that contain PowerGlyphs or PowerChars link to this object.

Unlike the Typography (For Outline Fonts) object which specifies the target font via the pdFontIndex or pdFontUniqueID property, the Typography (For PowerFonts) object specifies the target PowerFont via the pdPowerFontPtr link. Also, the Typography (For PowerFonts) object does not support all the features that the Typography (For Outline Fonts) object does. For example, body, outline and shadow styles are not supported and neither are multiple-master font instances.

In any other respect, this object serves the same purpose as the Typography (For Outline Fonts) object.

Designated Rendering Function: NONE

pdPowerFontPtr (1091)

Link to the PowerFont object.

pdUnderlinePtr (1114)

Also appears in: Typography (For Outline Fonts)

Link to the Line Definition (Minimal) object.

This link supplies attributes necessary to render the text underline and strike-through effects.

Properties

pdFontDw (1007)   PD_LONG_SIGNED

Also appears in: Typography (For Outline Fonts)

Width of a font or PowerFont in document units. If negative, font glyphs will be mirrored vertically.

Sample values:

12 = Font width of 12 document units
48 = Font width of 48 document units
-48 = Font width of 48 document units, mirrored vertically

pdFontDh (1008)   PD_LONG_SIGNED

Also appears in: Typography (For Outline Fonts)

Height of a font or PowerFont in document units. If negative, font glyphs will be mirrored horizontally.

Sample values:

12 = Font height of 12 document units
48 = Font height of 48 document units
-48 = Font height of 48 document units, mirrored horizontally

pdSkewHor (1009)   PD_WORD_SIGNED

Also appears in: Typography (For Outline Fonts)

Horizontal skew in degrees. If positive, font glyphs will be slanted to the left. If negative, font glyphs will be slanted to the right.

Sample values:

10 = Horizontal skew of 10 degrees
-10 = Horizontal skew of -10 degrees

pdSkewVer (1010)   PD_WORD_SIGNED

Also appears in: Typography (For Outline Fonts)

Vertical skew in degrees. If positive, font glyphs will be slanted downwards. If negative, font glyphs will be slanted upwards.

Sample values:

10 = Vertical skew of 10 degrees
-10 = Vertical skew of -10 degrees

pdRotation (1011)   PD_WORD_SIGNED

Also appears in: Typography (For Outline Fonts)

Font rotation in degrees. Must be between 0 and 360.

Sample values:

30 = Rotation of 30 degrees
120 = Rotation of 120 degrees

pdUnderline (1012)   PD_WORD_UNSIGNED

Also appears in: Typography (For Outline Fonts)

Font underline and/or strike-through effect.

The first byte (bits 1-8) is used to specify the type of the underline and/or strike-through effect. Supported values are as follows:

0 (000 000) = No Effect
1 (000 001) = Underline
2 (000 010) = Double Underline
8 (001 000) = Strike-Through
9 (001 001) = Strike-Through and Underline
10 (001 010) = Strike-Through and Double Underline
16 (010 000) = Double Strike-Through
17 (010 001) = Double Strike-Through and Underline
18 (010 010) = Double Strike-Through and Double Underline

If the line definition for the underline and/or strike-through effect is supplied (via the pdUnderlinePtr link in Power Engine or TX_ATTR_UNDERLINE_THICKNESS attribute in Unicode Text Module), then the second byte (bits 9-16) is used to specify the thickness of the secondary line in double underline and double strike-through effects relative to the primary line. The value itself is expressed in 1/255 increments of the thickness of the primary line. Value 0 is special and indicates a default thickness (which is set to 50% of the thickness of the primary line). The thickness of the primary line is supplied via the line definition and is expressed in 1/100 increments of document units..

Interpretation of the second byte when line definition is supplied:

0 = Default thickness (50% of the thickness of the primary line)
1 = 1/255 (or 0.39%) of the thickness of the primary line
2 = 2/255 (or 0.78%) of the thickness of the primary line
3 = 3/255 (or 1.17%) of the thickness of the primary line
...
253 = 253/255 (or 99.22%) of the thickness of the primary line
254 = 254/255 (or 99.61%) of the thickness of the primary line
255 = 255/255 (or 100%) of the thickness of the primary line

If the line definition for the underline and/or strike-through effect is not supplied (via the pdUnderlinePtr link in Power Engine or TX_ATTR_UNDERLINE_THICKNESS attribute in Unicode Text Module), then the second byte (bits 9-16) is used to specify the thickness of both the primary and secondary line relative to the font height. The value itself is expressed in 1/255 increments of the font height. Value 0 is special and indicates a default thickness (which is set to 3.5% of the font height).

Interpretation of the second byte when line definition is not supplied:

0 = Default thickness (3.5% of the font height)
1 = 1/255 (or 0.39%) of the font height
2 = 2/255 (or 0.78%) of the font height
3 = 3/255 (or 1.17%) of the font height
...
253 = 253/255 (or 99.22%) of the font height
254 = 254/255 (or 99.61%) of the font height
255 = 255/255 (or 100%) of the font height

Sample values:

3856 = Double strike-through whose primary line thickness is supplied via the line definition while the secondary line thickness is 15/255 (or 5.88%) of the primary line thickness

3856 = Double strike-through whose both primary and secondary line thickness is 15/255 (or 5.88%) of the font height

pdUnderlineParam0 (1121)   PD_LONG_SIGNED

Also appears in: Typography (For Outline Fonts)

Underline/Strike-Through Line Positioning Mode. Respected when font underline and/or strike-through effect is enabled.

Supported values:

0 = Automatic. In this mode the offset of the underline/strike-through line from the baseline is automatically calculated by the rendering engine. This mode is suitable for most purposes. However, because the calculated offset is dependent on the font height, the underline/strike-through line does not remain at the same position (i.e. it jumps) when the text contains glyphs/characters in different font sizes.

1 = Same as 0.

2 = Manual (% of font height). In this mode the offset of the underline/strike-through line from the baseline is manually specified and represents a percentage of the font height. Consequently, the underline/strike-through line does not remain at the same position (i.e. it jumps) when the text contains glyphs/characters in different font sizes.

3 = Same as 2.

4 = Manual (document units). In this mode the offset of the underline/strike-through line from the baseline is manually specified and represents an absolute distance in document units. Consequently, the underline/strike-through line remains at the same position (i.e. it does not jump) as it follows the text, even when the text contains glyphs/characters in different font sizes (assuming that all glyphs/characters are set using the standard portrait orientation).

5 = Same as 4.

pdUnderlineParam1 (1122)   PD_LONG_SIGNED

Also appears in: Typography (For Outline Fonts)

Offset of 1st underline from glyph's baseline.

The interpretation of the value depends on the specified Underline/Strike-Through Line Positioning Mode:

* Mode 0 - Automatic: This value is ignored and should be set to 0 or omitted.

* Mode 2 - Manual (% of font height): The offset is manually specified and represents the percentage of the font height, multiplied by 1024/100.

Examples:

-2048 = -200%
-1024 = -100%
-512 = -50%
0 = 0%
512 = 50%
1024 = 100%
2048 = 200%

* Mode 4 - Manual (document units): The offset is manually specified and represents the offset in document units, multiplied by 1024.

Examples:

-2048 = -2 doc units
-1024 = -1 doc units
-512 = -0.5 doc units
0 = 0 doc units
512 = 0.5 doc units
1024 = 1 doc units
2048 = 2 doc units

pdUnderlineParam2 (1123)   PD_LONG_SIGNED

Also appears in: Typography (For Outline Fonts)

Offset of 2nd underline from glyph's baseline.

The interpretation of the value depends on the specified Underline/Strike-Through Line Positioning Mode:

* Mode 0 - Automatic: This value is ignored and should be set to 0 or omitted.

* Mode 2 - Manual (% of font height): The offset is manually specified and represents the percentage of the font height, multiplied by 1024/100.

Examples:

-2048 = -200%
-1024 = -100%
-512 = -50%
0 = 0%
512 = 50%
1024 = 100%
2048 = 200%

* Mode 4 - Manual (document units): The offset is manually specified and represents the offset in document units, multiplied by 1024.

Examples:

-2048 = -2 doc units
-1024 = -1 doc units
-512 = -0.5 doc units
0 = 0 doc units
512 = 0.5 doc units
1024 = 1 doc units
2048 = 2 doc units

pdUnderlineParam3 (1124)   PD_LONG_SIGNED

Also appears in: Typography (For Outline Fonts)

Offset of 1st strike-through line from glyph's baseline.

The interpretation of the value depends on the specified Underline/Strike-Through Line Positioning Mode:

* Mode 0 - Automatic: This value is ignored and should be set to 0 or omitted.

* Mode 2 - Manual (% of font height): The offset is manually specified and represents the percentage of the font height, multiplied by 1024/100.

Examples:

-2048 = -200%
-1024 = -100%
-512 = -50%
0 = 0%
512 = 50%
1024 = 100%
2048 = 200%

* Mode 4 - Manual (document units): The offset is manually specified and represents the offset in document units, multiplied by 1024.

Examples:

-2048 = -2 doc units
-1024 = -1 doc units
-512 = -0.5 doc units
0 = 0 doc units
512 = 0.5 doc units
1024 = 1 doc units
2048 = 2 doc units

pdUnderlineParam4 (1125)   PD_LONG_SIGNED

Also appears in: Typography (For Outline Fonts)

Offset of 2nd strike-through line from glyph's baseline.

The interpretation of the value depends on the specified Underline/Strike-Through Line Positioning Mode:

* Mode 0 - Automatic: This value is ignored and should be set to 0 or omitted.

* Mode 2 - Manual (% of font height): The offset is manually specified and represents the percentage of the font height, multiplied by 1024/100.

Examples:

-2048 = -200%
-1024 = -100%
-512 = -50%
0 = 0%
512 = 50%
1024 = 100%
2048 = 200%

* Mode 4 - Manual (document units): The offset is manually specified and represents the offset in document units, multiplied by 1024.

Examples:

-2048 = -2 doc units
-1024 = -1 doc units
-512 = -0.5 doc units
0 = 0 doc units
512 = 0.5 doc units
1024 = 1 doc units
2048 = 2 doc units

Example

C/C++

DT_ID_SLONG obj[16];

obj[0] = pdObjAdd(pd, 0, "Surface Style");
obj[1] = pdObjAdd(pd, 0, "Outline Style");
obj[2] = pdObjAdd(pd, 0, "TextLine Body Style");
obj[3] = pdObjAdd(pd, 0, "Line Definition");
obj[4] = pdObjAdd(pd, 0, "LibShape");
obj[5] = pdObjAdd(pd, 0, "LibShape");
obj[6] = pdObjAdd(pd, 0, "TextLine Typography");
obj[7] = pdObjAdd(pd, 0, "Text Layout");
obj[8] = pdObjAdd(pd, 0, "TextLine");
obj[9] = pdObjAdd(pd, 0, "Group Member #0");
obj[10] = pdObjAdd(pd, 0, "Group Member #1");
obj[11] = pdObjAdd(pd, 0, "Group Member #2");
obj[12] = pdObjAdd(pd, 0, "Group");
obj[13] = pdObjAdd(pd, 0, "PowerFont Record #0");
obj[14] = pdObjAdd(pd, 0, "PowerFont");
obj[15] = pdObjAdd(pd, 0, "Typography");

/* Properties for object 0 */
pdPropAdd(pd, obj[0], pdRGBT, "FF004000", PD_HEX);

/* Properties for object 1 */
pdPropAdd(pd, obj[1], pdRGBT, "00000000", PD_HEX);

/* Properties for object 2 */
pdPropAdd(pd, obj[2], pdRGBT, "FFFFFF00", PD_HEX);

/* Properties for object 3 */
pdLinkAdd(pd, obj[3], pdStylePtr, obj[1]);
pdPropAdd(pd, obj[3], pdLineThickness, "400", PD_WORD_SIGNED);

/* Properties for object 4 */
pdLinkAdd(pd, obj[4], pdOutlinePtr, obj[3]);
pdPropAdd(pd, obj[4], pdID, "56", PD_WORD_UNSIGNED);
pdPropAdd(pd, obj[4], pdDw, "300", PD_LONG_SIGNED);
pdPropAdd(pd, obj[4], pdDh, "300", PD_LONG_SIGNED);

/* Properties for object 5 */
pdLinkAdd(pd, obj[5], pdBodyPtr, obj[0]);
pdPropAdd(pd, obj[5], pdID, "56", PD_WORD_UNSIGNED);
pdPropAdd(pd, obj[5], pdDw, "270", PD_LONG_SIGNED);
pdPropAdd(pd, obj[5], pdDh, "270", PD_LONG_SIGNED);

/* Properties for object 6 */
pdLinkAdd(pd, obj[6], pdBodyPtr, obj[2]);
pdPropAdd(pd, obj[6], pdFontIndex, "0", PD_WORD_SIGNED);
pdPropAdd(pd, obj[6], pdFontDw, "95", PD_WORD_SIGNED);
pdPropAdd(pd, obj[6], pdFontDh, "130", PD_WORD_SIGNED);
pdPropAdd(pd, obj[6], pdSkewHor, "0", PD_WORD_SIGNED);
pdPropAdd(pd, obj[6], pdSkewVer, "0", PD_WORD_SIGNED);
pdPropAdd(pd, obj[6], pdRotation, "0", PD_WORD_SIGNED);

/* Properties for object 7 */
pdPropAdd(pd, obj[7], pdKerning, "1", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[7], pdAlign, "0", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[7], pdAlignEnd, "0", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[7], pdRelativeDirection, "0", PD_BYTE_UNSIGNED);

/* Properties for object 8 */
pdLinkAdd(pd, obj[8], pdTypographyPtr, obj[6]);
pdLinkAdd(pd, obj[8], pdTextLayoutPtr, obj[7]);
pdPropAdd(pd, obj[8], pdTextString_08, "STOP", PD_ASC);

/* Properties for object 9 */
pdLinkAdd(pd, obj[9], pdGroupMemberPtr, obj[10]);
pdLinkAdd(pd, obj[9], pdFnDrawObjectPtr, obj[4]);
pdPropAdd(pd, obj[9], pdFnDraw, "18", PD_WORD_SIGNED);
pdPropAdd(pd, obj[9], pdDx, "0", PD_LONG_SIGNED);
pdPropAdd(pd, obj[9], pdDy, "-300", PD_LONG_SIGNED);

/* Properties for object 10 */
pdLinkAdd(pd, obj[10], pdGroupMemberPtr, obj[11]);
pdLinkAdd(pd, obj[10], pdFnDrawObjectPtr, obj[5]);
pdPropAdd(pd, obj[10], pdFnDraw, "18", PD_WORD_SIGNED);
pdPropAdd(pd, obj[10], pdDx, "15", PD_LONG_SIGNED);
pdPropAdd(pd, obj[10], pdDy, "-285", PD_LONG_SIGNED);

/* Properties for object 11 */
pdLinkAdd(pd, obj[11], pdFnDrawObjectPtr, obj[8]);
pdPropAdd(pd, obj[11], pdFnDraw, "1", PD_WORD_SIGNED);
pdPropAdd(pd, obj[11], pdDx, "19", PD_LONG_SIGNED);
pdPropAdd(pd, obj[11], pdDy, "-102", PD_LONG_SIGNED);

/* Properties for object 12 */
pdLinkAdd(pd, obj[12], pdGroupMemberPtr, obj[9]);

/* Properties for object 13 */
pdLinkAdd(pd, obj[13], pdFnDrawObjectPtr, obj[12]);
pdPropAdd(pd, obj[13], pdDw, "350", PD_LONG_SIGNED);

/* Properties for object 14 */
pdLinkAdd(pd, obj[14], pdPowerFontRecordPtr, obj[13]);
pdPropAdd(pd, obj[14], pdBoundingBox, "-50, -50, 350, 350", PD_ARR_LONG_SIGNED);
pdPropAdd(pd, obj[14], pdDw, "300", PD_LONG_SIGNED);
pdPropAdd(pd, obj[14], pdDh, "300", PD_LONG_SIGNED);

/* Properties for object 15 */
pdLinkAdd(pd, obj[15], pdPowerFontPtr, obj[14]);
pdPropAdd(pd, obj[15], pdFontDw , "100", PD_WORD_SIGNED);
pdPropAdd(pd, obj[15], pdFontDh , "100", PD_WORD_SIGNED);
pdPropAdd(pd, obj[15], pdSkewHor , "-12", PD_WORD_SIGNED);

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("Surface Style");
local obj_1 = o("Outline Style");
local obj_2 = o("TextLine Body Style");
local obj_3 = o("Line Definition");
local obj_4 = o("LibShape");
local obj_5 = o("LibShape");
local obj_6 = o("TextLine Typography");
local obj_7 = o("Text Layout");
local obj_8 = o("TextLine");
local obj_9 = o("Group Member #0");
local obj_10 = o("Group Member #1");
local obj_11 = o("Group Member #2");
local obj_12 = o("Group");
local obj_13 = o("PowerFont Record #0");
local obj_14 = o("PowerFont");
local obj_15 = o("Typography");

/* Object Properties */

obj_0 + s(pdRGBT, "FF004000");

obj_1 + s(pdRGBT, "00000000");

obj_2 + s(pdRGBT, "FFFFFF00");

obj_3 + l(pdStylePtr, obj_1);
obj_3 + i(pdLineThickness, 400);

obj_4 + l(pdOutlinePtr, obj_3);
obj_4 + i(pdID, 56);
obj_4 + i(pdDw, 300);
obj_4 + i(pdDh, 300);

obj_5 + l(pdBodyPtr, obj_0);
obj_5 + i(pdID, 56);
obj_5 + i(pdDw, 270);
obj_5 + i(pdDh, 270);

obj_6 + l(pdBodyPtr, obj_2);
obj_6 + i(pdFontIndex, 0);
obj_6 + i(pdFontDw, 95);
obj_6 + i(pdFontDh, 130);
obj_6 + i(pdSkewHor, 0);
obj_6 + i(pdSkewVer, 0);
obj_6 + i(pdRotation, 0);

obj_7 + i(pdKerning, 1);
obj_7 + i(pdAlign, 0);
obj_7 + i(pdAlignEnd, 0);
obj_7 + i(pdRelativeDirection, 0);

obj_8 + l(pdTypographyPtr, obj_6);
obj_8 + l(pdTextLayoutPtr, obj_7);
obj_8 + s(pdTextString_08, "STOP");

obj_9 + l(pdGroupMemberPtr, obj_10);
obj_9 + l(pdFnDrawObjectPtr, obj_4);
obj_9 + i(pdFnDraw, 18);
obj_9 + i(pdDx, 0);
obj_9 + i(pdDy, -300);

obj_10 + l(pdGroupMemberPtr, obj_11);
obj_10 + l(pdFnDrawObjectPtr, obj_5);
obj_10 + i(pdFnDraw, 18);
obj_10 + i(pdDx, 15);
obj_10 + i(pdDy, -285);

obj_11 + l(pdFnDrawObjectPtr, obj_8);
obj_11 + i(pdFnDraw, 1);
obj_11 + i(pdDx, 19);
obj_11 + i(pdDy, -102);

obj_12 + l(pdGroupMemberPtr, obj_9);

obj_13 + l(pdFnDrawObjectPtr, obj_12);
obj_13 + i(pdDw, 350);

obj_14 + l(pdPowerFontRecordPtr, obj_13);
obj_14 + p(pdBoundingBox, "-50, -50, 350, 350");
obj_14 + i(pdDw, 300);
obj_14 + i(pdDh, 300);

obj_15 + l(pdPowerFontPtr, obj_14);
obj_15 + i(pdFontDw , 100);
obj_15 + i(pdFontDh , 100);
obj_15 + i(pdSkewHor , -12);
 

Index