Index

PowerDoc Objects

Typography (For Outline Fonts)

Overview

This object represents a set of typographic parameters that apply to regular outline fonts. It is one of the elementary PowerDoc objects; many higher-level objects that contain glyphs, characters or text link to this object.

While constructing the typography object, an optional shadow, outline and/or underline may be included.

Designated Rendering Function: NONE

Note 1: Although pdBodyPtr is a key link, it is not mandatory. This means that it is possible to construct a typography object that has no body, only an outline and/or a shadow and/or an underline.

Note 2: When constructing the Typography (For Outline Fonts) object, pdFontIndex and pdFontUniqueID cannot be used at the same time. If both properties are present, pdFontIndex will be used. The assumption is that pdFontIndex is a valid font index. If it's not, the engine will use the first available font.

When pdFontIndex is not present, the engine will try to find and use the font specified by the pdFontUniqueID property. If this font is not available, the engine will then attempt to load it, providing that the pdFontDataPtr link is present (which indicates that the font file is embedded in the document). If it's not or if this operation fails, the engine will use the first available font.

Finally, if neither pdFontIndex nor pdFontUniqueID are present, the engine will use the first available font.

pdBodyPtr (1013)

Also appears in: Row Boundary, Typographic Frame, Library Shape, Rectangle, Circle/Ellipse, True Circle/Ellipse, Slice, Pattern, Grid, Custom Shape or Polygon, Gradient, Gradient (As Fast Rectangle)

Link to the Surface Definition object.

This link supplies style attributes for the body of an object. Style attributes include color, transparency, pattern fills, special effects (e.g. blur, emboss, pattern fill) etc.

pdOutlinePtr (1014)

Also appears in: Row Boundary, Typographic Frame, Library Shape, Rectangle, Circle/Ellipse, True Circle/Ellipse, Slice, Grid, Custom Shape or Polygon

Link to the Outline Definition object.

This link supplies parameters necessary to render the outline of an object.

pdShadowPtr (1016)

Also appears in: Baseline, Row Boundary, Typographic Frame, Library Polyline, Library Shape, Line, Rectangle, Circle/Ellipse, True Circle/Ellipse, Slice, Arc, Grid, Custom Shape or Polygon, Polyline (also Bezier and B-Spline curve)

Link to the Shadow Definition object.

Used to render the shadow of a line, shape or some other object.

pdFontDataPtr (1069)

Link to the Font Data object.

This is an optional link. It indicates that the font data (file) is embedded in the document. This link should only be used when the font is specified by the pdFontUniqueID property. If the font is specified by the pdFontIndex property, this link is ignored and, therefore, should be omitted.

pdUnderlinePtr (1114)

Also appears in: Typography (For PowerFonts)

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 PowerFonts)

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 PowerFonts)

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

pdFontIndex (1006)   PD_WORD_SIGNED

A system dependent font index used to reference a font.

Sample values:

0 = CMU Sans Serif, Medium
1 = CMU Concrete Roman, Roman
2 = CMU Bright Roman, Roman
3 = CMU Bright SemiBold, SemiBold

pdSkewHor (1009)   PD_WORD_SIGNED

Also appears in: Typography (For PowerFonts)

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 PowerFonts)

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 PowerFonts)

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

Sample values:

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

pdMMContributions (1067)   PD_ARR_WORD_SIGNED

An array of Multiple-Master font contributions. The value of each element must be in the 0 - 1024 range, where zero means "no contribution" (or 0% contribution) and 1024 means "full contribution" (or 100% contribution). The number of elements in this array must correspond to the number of base designs in the font. Additionally, the sum of all the elements must equal 1024.

This field is useful only when it refers to a Multiple-Master font. With regular (single-master) fonts, this field has no meaning and is ignored. See D-Type Standard Engine Manual for more information on Multiple-Master fonts.

Sample values:

'205, 307, 307, 205' = Contributions of 20%, 30%, 30%, 20% for a multiple-master font with 4 base designs

pdFontUniqueID (1068)   PD_ASC

Unique Font Identifier. This is a 16-byte string that uniquely identifies the font. Contact D-Type for naming conventions.

Sample values:

'F0010_ARIAL__NS0' = Arial, Regular
'F0011_TIMES__NS0' = Times New Roman, Regular
'F0013_COUR___NS0' = Courier New, Medium
'F0010_DENMRK_SS0' = Denmark Regular, Regular
'F0010_GENTI__NS0' = Gentium, Regular

pdUnderline (1012)   PD_WORD_UNSIGNED

Also appears in: Typography (For PowerFonts)

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 PowerFonts)

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 PowerFonts)

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 PowerFonts)

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 PowerFonts)

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 PowerFonts)

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[6];

obj[0] = pdObjAdd(pd, 0, "TextLine Outline Style");
obj[1] = pdObjAdd(pd, 0, "TextLine Body Style");
obj[2] = pdObjAdd(pd, 0, "TextLine Shadow Style");
obj[3] = pdObjAdd(pd, 0, "TextLine Outline");
obj[4] = pdObjAdd(pd, 0, "TextLine Shadow");
obj[5] = pdObjAdd(pd, 0, "TextLine Typography");

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

/* Properties for object 1 */
pdPropAdd(pd, obj[1], pdRGBT, "B4961400", PD_HEX);
pdPropAdd(pd, obj[1], pdEP, "030A", PD_HEX);

/* Properties for object 2 */
pdPropAdd(pd, obj[2], pdRGBT, "80808078", PD_HEX);
pdPropAdd(pd, obj[2], pdEP, "030A", PD_HEX);

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

/* Properties for object 4 */
pdLinkAdd(pd, obj[4], pdStylePtr, obj[2]);
pdPropAdd(pd, obj[4], pdShadowDx, "5", PD_WORD_SIGNED);
pdPropAdd(pd, obj[4], pdShadowDy, "5", PD_WORD_SIGNED);

/* Properties for object 5 */
pdLinkAdd(pd, obj[5], pdBodyPtr, obj[1]);
pdLinkAdd(pd, obj[5], pdShadowPtr, obj[4]);
pdLinkAdd(pd, obj[5], pdOutlinePtr, obj[3]);
pdPropAdd(pd, obj[5], pdFontIndex, "0", PD_WORD_SIGNED);
pdPropAdd(pd, obj[5], pdFontDw, "90", PD_WORD_SIGNED);
pdPropAdd(pd, obj[5], pdFontDh, "90", 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("TextLine Outline Style");
local obj_1 = o("TextLine Body Style");
local obj_2 = o("TextLine Shadow Style");
local obj_3 = o("TextLine Outline");
local obj_4 = o("TextLine Shadow");
local obj_5 = o("TextLine Typography");

/* Object Properties */

obj_0 + s(pdRGBT, "50641400");

obj_1 + s(pdRGBT, "B4961400");
obj_1 + s(pdEP, "030A");

obj_2 + s(pdRGBT, "80808078");
obj_2 + s(pdEP, "030A");

obj_3 + l(pdStylePtr, obj_0);
obj_3 + i(pdLineThickness, 240);

obj_4 + l(pdStylePtr, obj_2);
obj_4 + i(pdShadowDx, 5);
obj_4 + i(pdShadowDy, 5);

obj_5 + l(pdBodyPtr, obj_1);
obj_5 + l(pdShadowPtr, obj_4);
obj_5 + l(pdOutlinePtr, obj_3);
obj_5 + i(pdFontIndex, 0);
obj_5 + i(pdFontDw, 90);
obj_5 + i(pdFontDh, 90);
 

Index