2.2.2.2.1.2.6.1 Cache Glyph Data - Revision 2 (TS_CACHE_GLYPH_DATA_REV2)

The TS_CACHE_GLYPH_DATA_REV2 structure contains information describing a single glyph that is to be stored in a glyph cache (section 3.1.1.1.2). The ID of this destination glyph cache is specified by the cacheId field of the container Cache Glyph (Revision 2) Order (section 2.2.2.2.1.2.6).


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

cacheIndex

x (variable)

...

y (variable)

...

cx (variable)

...

cy (variable)

...

aj (variable)

...

cacheIndex (1 byte): An 8-bit, unsigned integer. The index of the target entry in the destination glyph cache where the glyph data MUST be stored. This value MUST be greater than or equal to 0, and less than the maximum number of entries allowed in the destination glyph cache. The maximum number of entries allowed in each of the ten glyph caches is specified in the GlyphCache field of the Glyph Cache Capability Set ([MS-RDPBCGR] section 2.2.7.1.8).

x (variable): A Two-Byte Signed Encoding (section 2.2.2.2.1.2.1.3) structure. The X component of the coordinate that defines the origin of the character within the glyph bitmap. The top-left corner of the bitmap is (0, 0).

y (variable): A Two-Byte Signed Encoding (section 2.2.2.2.1.2.1.3) structure. The Y component of the coordinate that defines the origin of the character within the glyph bitmap. The top-left corner of the bitmap is (0, 0).

cx (variable): A Two-Byte Unsigned Encoding (section 2.2.2.2.1.2.1.2) structure. The width of the glyph bitmap in pixels.

cy (variable): A Two-Byte Unsigned Encoding (section 2.2.2.2.1.2.1.2) structure. The height of the glyph bitmap in pixels.

aj (variable): A variable-sized byte array containing a 1-bit-per-pixel bitmap of the glyph.

The individual scan lines are encoded in top-down order, and each scan line MUST be byte-aligned. After the array has been populated with bitmap data, it MUST be padded to a double-word boundary (the size of the structure in bytes MUST be a multiple of 4). The size, in bytes, of the glyph data is given by the following function.

 ROUND_UP_TO_NEAREST_MULTIPLE_OF_4(((cx + 7) / 8) * cy)

For examples of 1-bit-per-pixel encoded glyph bitmaps, see sections 4.6.1 and 4.6.2.