inline void process_glyphcache(GlyphCache & gly_cache, InStream & stream) { const uint8_t cacheId = stream.in_uint8(); const uint8_t nglyphs = stream.in_uint8(); for (uint8_t i = 0; i < nglyphs; i++) { const uint16_t cacheIndex = stream.in_uint16_le(); const int16_t offset = stream.in_sint16_le(); const int16_t baseline = stream.in_sint16_le(); const uint16_t width = stream.in_uint16_le(); const uint16_t height = stream.in_uint16_le(); const unsigned int datasize = (height * nbbytes(width) + 3) & ~3; const uint8_t * data = stream.in_uint8p(datasize); server_add_char(gly_cache, cacheId, cacheIndex, offset, baseline, width, height, data); } }