STROBJ (Compact 2013)


The STROBJ class, or text string object, contains an enumeration of glyph handles and positions for the device driver.

class _STROBJ {
  ULONG cGlyphs;
  FLONG flAccel;
  ULONG ulCharInc;
  RECTL rclBkGround;
  GLYPHPOS *pgp;
  LPWSTR pwszOrg;


Specifies the number of glyphs in the STROBJ.


Specifies a set of accelerator flags. This member can be any of the following values:




Fixed-width spacing is added to every break character.


Fixed-width spacing is added between each pair of consecutive glyphs.


Spacing is determined by bitmap sizes. In this context, the bitmap base is defined as cx for the horizontal case, and cy for the vertical case. When this bit is set, the bitmap for every glyph in a font (supplied in GLYPHBITS structure by GDI) will have a base equal to the advance width for that glyph. This does not mean that this is a fixed pitch font. (Not used for PATHOBJs.)


A printer driver should not substitute one of its printer fonts for GDI's font choice.


Glyphs are to be rendered at random positions.


A glyph's orientation is different from the escapement direction. Escapement is the angle the text direction makes with the horizontal. Orientation is the angle between the glyph's baseline and the escapement direction.


Default increment vectors are used to position the characters.


pwszOrg points to an array of glyph indexes, rather than a Unicode array.


Text is horizontal; left-to-right or right-to-left, depending on SO_REVERSED. The y-coordinate is only supplied for the first glyph in the string.


Bitmaps have the same widths. In this context, the bitmap side is defined as cy for the horizontal case and cx for the vertical case. This flag guarantees that all glyphs in the font will have the same side equal to the sum of ascender and descender.

However, this bit indicates more than just a constant side. For the horizontal case, this bit also indicates that the vertical distance between the top of the glyph's bitmap and its character origin is equal to the ascender for all glyphs. For the vertical case, this bit indicates that the horizontal distance between the glyph's origin and "top" of the glyph's bitmap (which is really right or left, depending on whether you are writing in the direction of positive or negative y-axis) is equal to the ascender. In either case, the tops and bottoms of all glyph bitmaps lay on the same line in the direction of writing. (Not used for PATHOBJs.)


Set if horizontal is right-to-left or vertical is bottom-to-top.


Text is vertical; top-to-bottom or bottom-to-top, depending on SO_REVERSED. The x-coordinate is only supplied for the first glyph in the string.


All glyphs have zero A and zero C spacing. This bit guarantees that glyph's black boxes do not overlap.


Specifies whether the font is a fixed-pitch (monospace) font. If it is, this member is equal to the advance width of glyphs in pels; otherwise, it is zero. When this member is nonzero, GDI supplies a valid coordinate for only the first character in the string. All other character positions must be generated by the driver by successively adding the value of this member along the writing direction.


Specifies a RECTL structure that describes the bounding box for the string.


Pointer to the GLYPHPOS array for the whole string. Can be NULL.


Pointer to the original Unicode string or cGlyphs characters. Contrary to its name, this string is not usually null-terminated. Also, this string is not always valid, such as in journalling with printer fonts, in which case this parameter will be NULL.

A driver can call STROBJ_vEnumStart and STROBJ_bEnum to obtain identities and positions of glyphs in the string. If pgp is not NULL, it points to a GLYPHPOS array describing the whole string and only a single call to STROBJ_bEnum is required. If pgp is NULL, STROBJ_bEnum will have to be called repeatedly in a loop to obtain all the string's glyph positions.