Share via


STROBJ (Compact 2013)

3/28/2014

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

Syntax

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

Parameters

  • cGlyphs
    Specifies the number of glyphs in the STROBJ.
  • flAccel
    Specifies a set of accelerator flags. This member can be any of the following values:

    Value

    Meaning

    SO_BREAK_EXTRA

    Fixed-width spacing is added to every break character.

    SO_CHARACTER_EXTRA

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

    SO_CHAR_INC_EQUAL_BM_BASE

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

    SO_DO_NOT_SUBSTITUTE_DEVICE_FONT

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

    SO_DXDY

    Glyphs are to be rendered at random positions.

    SO_ESC_NOT_ORIENT

    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.

    SO_FLAG_DEFAULT_PLACEMENT

    Default increment vectors are used to position the characters.

    SO_GLYPHINDEX_TEXTOUT

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

    SO_HORIZONTAL

    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.

    SO_MAXEXT_EQUAL_BM_SIDE

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

    SO_REVERSED

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

    SO_VERTICAL

    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.

    SO_ZERO_BEARINGS

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

  • ulCharInc
    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.
  • rclBkGround
    Specifies a RECTL structure that describes the bounding box for the string.
  • pgp
    Pointer to the GLYPHPOS array for the whole string. Can be NULL.
  • pwszOrg
    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.

Remarks

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.

Requirements

Header

winddi.h

See Also

Reference

Fonts Structures