27 #ifndef HB_OT_CFF2_TABLE_HH
28 #define HB_OT_CFF2_TABLE_HH
40 #define HB_OT_TAG_cff2 HB_TAG('C','F','F','2')
56 unsigned int size =
src.get_size (num_glyphs);
63 unsigned int get_size (
unsigned int num_glyphs)
const
67 case 0:
return format.static_size +
u.format0.get_size (num_glyphs);
68 case 3:
return format.static_size +
u.format3.get_size ();
69 case 4:
return format.static_size +
u.format4.get_size ();
81 case 0:
return u.format0.get_fd (glyph);
82 case 3:
return u.format3.get_fd (glyph);
83 case 4:
return u.format4.get_fd (glyph);
124 unsigned int size_ =
varStore->get_size ();
131 unsigned int get_size ()
const {
return HBUINT16::static_size +
size; }
179 if (!env.
argStack.is_empty ())
return;
228 template <
typename VAL>
314 if (!env.
argStack.is_empty ())
return;
356 if (!env.
argStack.is_empty ())
return;
375 template <
typename ITER,
typename OP_SERIALIZER>
397 template <
typename PRIVOPSET,
typename PRIVDICTVAL>
404 privateDicts.init ();
406 this->blob = sc.reference_table<
cff2> (
face);
409 sc.init (this->blob);
410 sc.start_processing ();
412 const OT::cff2 *
cff2 = this->blob->template as<OT::cff2> ();
421 top_interp.
env.
init (topDictStr);
427 varStore = &StructAtOffsetOrNull<CFF2VariationStore> (
cff2,
topDict.vstoreOffset);
428 charStrings = &StructAtOffsetOrNull<CFF2CharStrings> (
cff2,
topDict.charStringsOffset);
429 fdArray = &StructAtOffsetOrNull<CFF2FDArray> (
cff2,
topDict.FDArrayOffset);
430 fdSelect = &StructAtOffsetOrNull<CFF2FDSelect> (
cff2,
topDict.FDSelectOffset);
439 num_glyphs = charStrings->count;
440 if (num_glyphs != sc.get_num_glyphs ())
443 fdCount = fdArray->count;
444 if (!privateDicts.resize (fdCount))
448 for (
unsigned int i = 0;
i < fdCount;
i++)
454 font_interp.
env.
init (fontDictStr);
455 font = fontDicts.push ();
460 const byte_str_t privDictStr (StructAtOffsetOrNull<UnsizedByteStr> (
cff2,
font->privateDictInfo.offset),
font->privateDictInfo.size);
463 priv_interp.
env.
init(privDictStr);
464 privateDicts[
i].init ();
467 privateDicts[
i].localSubrs = &StructAtOffsetOrNull<CFF2Subrs> (&privDictStr[0], privateDicts[
i].subrsOffset);
469 unlikely (!privateDicts[
i].localSubrs->sanitize (&sc)))
482 sc.end_processing ();
485 privateDicts.fini ();
503 unsigned int fdCount = 0;
508 unsigned int num_glyphs = 0;
small capitals from c petite p scientific i
[1]
void hb_blob_destroy(hb_blob_t *blob)
#define OpCode_BlueValues
#define OpCode_FontMatrix
#define OpCode_vsindexdict
#define OpCode_ExpansionFactor
#define OpCode_LanguageGroup
#define OpCode_FamilyOtherBlues
#define OpCode_FamilyBlues
#define OpCode_OtherBlues
#define TRACE_SERIALIZE(this)
#define TRACE_SANITIZE(this)
#define return_trace(RET)
bool hb_subset_cff2(hb_subset_context_t *c)
FDSelect3_4_Range< HBUINT32, HBUINT16 > FDSelect4_Range
CFF2Index CFF2CharStrings
cff2_private_dict_values_base_t< op_str_t > cff2_private_dict_values_subset_t
dict_interpreter_t< cff2_top_dict_opset_t, cff2_top_dict_values_t > cff2_top_dict_interpreter_t
CFFIndex< HBUINT32 > CFF2Index
dict_interpreter_t< cff2_font_dict_opset_t, cff2_font_dict_values_t > cff2_font_dict_interpreter_t
FDSelect3_4< HBUINT32, HBUINT16 > FDSelect4
cff2_private_dict_values_base_t< num_dict_val_t > cff2_private_dict_values_t
Subrs< HBUINT32 > CFF2Subrs
set set set set set set set macro pixldst1 op
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum format
bool serialize(hb_serialize_context_t *c, ITER it, OP_SERIALIZER &opszr)
bool sanitize(hb_sanitize_context_t *c, unsigned int fdcount) const
union CFF::CFF2FDSelect::@148 u
hb_codepoint_t get_fd(hb_codepoint_t glyph) const
unsigned int get_size(unsigned int num_glyphs) const
bool serialize(hb_serialize_context_t *c, const CFF2FDSelect &src, unsigned int num_glyphs)
unsigned int get_size() const
bool sanitize(hb_sanitize_context_t *c) const
DEFINE_SIZE_MIN(2+VariationStore::min_size)
bool serialize(hb_serialize_context_t *c, const CFF2VariationStore *varStore)
static void process_op(op_code_t op, num_interp_env_t &env, cff2_font_dict_values_t &dictval)
table_info_t privateDictInfo
unsigned int get_ivs() const
void init(const byte_str_t &str)
void set_ivs(unsigned int ivs_)
static void process_op(op_code_t op, cff2_priv_dict_interp_env_t &env, cff2_private_dict_values_subset_t &dictval)
static void process_op(op_code_t op, cff2_priv_dict_interp_env_t &env, cff2_private_dict_values_t &dictval)
const CFF2Subrs * localSubrs
static void process_op(op_code_t op, num_interp_env_t &env, cff2_top_dict_values_t &dictval)
unsigned int vstoreOffset
unsigned int FDSelectOffset
bool interpret(PARAM ¶m)
static void process_op(op_code_t op, interp_env_t< number_t > &env)
void init(const byte_str_t &str_)
arg_stack_t< ARG > argStack
void add_op(op_code_t op, const byte_str_ref_t &str_ref=byte_str_ref_t())
static void process_op(op_code_t op, interp_env_t< number_t > &env, top_dict_values_t< VAL > &dictval)
bool sanitize(hb_sanitize_context_t *c) const
accelerator_t(hb_face_t *face)
hb_vector_t< cff2_font_dict_values_t > fontDicts
hb_vector_t< PRIVDICTVAL > privateDicts
cff2_top_dict_values_t topDict
accelerator_templ_t(hb_face_t *face)
cff2_accelerator_t(hb_face_t *face)
bool sanitize(hb_sanitize_context_t *c) const
bool subset(hb_subset_context_t *c) const
static constexpr hb_tag_t tableTag
NNOffsetTo< TopDict, HBUINT8 > topDict
accelerator_templ_t< cff2_private_dict_opset_subset_t, cff2_private_dict_values_subset_t > accelerator_subset_t
FixedVersion< HBUINT8 > version
bool sanitize(hb_sanitize_context_t *c) const