26 #ifndef HB_OT_VAR_COMMON_HH
27 #define HB_OT_VAR_COMMON_HH
42 auto *
out =
c->start_embed (
this);
45 unsigned total_size = min_size +
mapCount * get_width ();
49 memcpy (
p,
this, HBUINT8::static_size * total_size);
56 unsigned int width = plan.get_width ();
57 unsigned int inner_bit_count = plan.get_inner_bit_count ();
61 if (
unlikely (output_map.
length && ((((inner_bit_count-1)&~0xF)!=0) || (((
width-1)&~0x3)!=0))))
69 for (
unsigned int i = 0;
i < output_map.
length;
i++)
71 unsigned int v = output_map[
i];
72 unsigned int outer =
v >> 16;
73 unsigned int inner =
v & 0xFFFF;
74 unsigned int u = (outer << inner_bit_count) | inner;
75 for (
unsigned int w =
width;
w > 0;)
85 uint32_t
map (
unsigned int v)
const
97 unsigned int w = get_width ();
104 unsigned int n = get_inner_bit_count ();
105 unsigned int outer =
u >>
n;
106 unsigned int inner =
u & ((1 <<
n) - 1);
107 u = (outer<<16) | inner;
113 unsigned get_map_count ()
const {
return mapCount; }
114 unsigned get_width ()
const {
return ((
entryFormat >> 4) & 3) + 1; }
115 unsigned get_inner_bit_count ()
const {
return (
entryFormat & 0xF) + 1; }
147 auto *
out =
c->start_embed (
this);
150 unsigned total_size = min_size +
mapCount * get_width ();
154 memcpy (
p,
this, HBUINT8::static_size * total_size);
158 unsigned get_map_count ()
const {
return mapCount; }
159 unsigned get_width ()
const {
return ((
entryFormat >> 4) & 3) + 1; }
160 unsigned get_inner_bit_count ()
const {
return (
entryFormat & 0xF) + 1; }
185 template <
typename T>
195 uint32_t
map (
unsigned v)
const
198 case 0:
return (
u.format0.map (
v));
206 case 0:
return u.format0.get_map_count ();
207 case 1:
return u.format1.get_map_count ();
215 case 0:
return u.format0.get_width ();
216 case 1:
return u.format1.get_width ();
224 case 0:
return u.format0.get_inner_bit_count ();
225 case 1:
return u.format1.get_inner_bit_count ();
small capitals from c petite p scientific f u
small capitals from c petite p scientific i
[1]
QMap< QString, QString > map
[6]
#define TRACE_SERIALIZE(this)
#define TRACE_SANITIZE(this)
#define return_trace(RET)
IntType< uint8_t > HBUINT8
GLsizei const GLfloat * v
[13]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei GLenum format
QTextStream out(stdout)
[7]
DEFINE_SIZE_UNION(1, format)
DeltaSetIndexMapFormat0 format0
unsigned get_inner_bit_count() const
DeltaSetIndexMapFormat1 format1
bool serialize(hb_serialize_context_t *c, const T &plan)
uint32_t map(unsigned v) const
unsigned get_map_count() const
bool sanitize(hb_sanitize_context_t *c) const
DeltaSetIndexMap * copy(hb_serialize_context_t *c) const
unsigned get_width() const
union OT::DeltaSetIndexMap::@189 u
Type arrayZ[HB_VAR_ARRAY]