2.2.2.2.1.2.6 Cache Glyph - Revision 2 (CACHE_GLYPH_REV2_ORDER)

The Cache Glyph - Revision 2 Secondary Drawing Order is used by the server to instruct the client to store a glyph in a particular Glyph Cache entry. This order is similar to the Cache Glyph - Revision 1 Secondary Drawing Order (section 2.2.2.2.1.2.5) except that it represents glyphs using a more compact format and moves a number of fields into the extraFlags field of the secondary order header. Support for glyph caching is specified in the Glyph Cache Capability Set ([MS-RDPBCGR] section 2.2.7.1.8).


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

header

...

glyphDataRev2 (variable)

...

unicodeCharacters (variable)

...

header (6 bytes): A Secondary Order Header, as defined in section 2.2.2.2.1.2.1.1. The embedded orderType field MUST be set to TS_CACHE_GLYPH (0x03).

The format of the embedded extraFlags word is described by the following bitmask diagram.


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

cacheId

flags

cGlyphs

cacheId (4 bits): A 4-bit unsigned integer. The ID of the glyph cache in which the glyph data MUST be stored. This value MUST be in the range 0 to 9 (inclusive).

flags (4 bits): A 4-bit, unsigned integer. Various operational flags.

Value

Meaning

CG2_GLYPH_UNICODE_PRESENT

0x1

Indicates that the unicodeCharacters field is present.

GLYPH_ORDER_REV2

0x2

Indicates that this is a Cache Glyph - Revision 2 Order; the Cache Glyph - Revision 1 (section 2.2.2.2.1.2.5) extraFlags header field does not contain a flag with this value.

cGlyphs (1 byte): An 8-bit, unsigned integer. The number of glyph entries in the glyphData field.

glyphDataRev2 (variable): The specification for each of the glyphs in this order (the number of glyphs is given by the cGlyphs field embedded in the header field) defined using Cache Glyph Data - Revision 2 (section 2.2.2.2.1.2.6.1) structures.

unicodeCharacters (variable): An array of Unicode characters. Contains the Unicode character representation of each glyph in the glyphData field. The number of bytes in the field is given by cGlyphs * 2 (where cGlyphs is embedded in the header field). This field MUST NOT be null-terminated. This string is used for diagnostic purposes only and is not necessary for successfully decoding and caching the glyphs in the glyphData field.