tweaks to build with new merge
This commit is contained in:
parent
e600e5440b
commit
2840a104c1
|
@ -114,12 +114,16 @@ struct CFF2CSInterpEnv : CSInterpEnv<BlendArg, CFF2Subrs>
|
|||
|
||||
inline const BlendArg& eval_arg (unsigned int i)
|
||||
{
|
||||
return blend_arg (argStack[i]);
|
||||
BlendArg &arg = argStack[i];
|
||||
blend_arg (arg);
|
||||
return arg;
|
||||
}
|
||||
|
||||
inline const BlendArg& pop_arg (void)
|
||||
{
|
||||
return blend_arg (argStack.pop ());
|
||||
BlendArg &arg = argStack.pop ();
|
||||
blend_arg (arg);
|
||||
return arg;
|
||||
}
|
||||
|
||||
inline void process_blend (void)
|
||||
|
@ -155,7 +159,7 @@ struct CFF2CSInterpEnv : CSInterpEnv<BlendArg, CFF2Subrs>
|
|||
inline void set_ivs (unsigned int ivs_) { ivs = ivs_; }
|
||||
|
||||
protected:
|
||||
inline BlendArg& blend_arg (BlendArg &arg)
|
||||
inline void blend_arg (BlendArg &arg)
|
||||
{
|
||||
if (do_blend && arg.blending ())
|
||||
{
|
||||
|
@ -170,7 +174,6 @@ struct CFF2CSInterpEnv : CSInterpEnv<BlendArg, CFF2Subrs>
|
|||
arg.deltas.resize (0);
|
||||
}
|
||||
}
|
||||
return arg;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
@ -95,13 +95,14 @@ struct CFF2PathProcs_Extents : PathProcs<CFF2PathProcs_Extents, CFF2CSInterpEnv,
|
|||
|
||||
struct CFF2CSOpSet_Extents : CFF2CSOpSet<CFF2CSOpSet_Extents, ExtentsParam, CFF2PathProcs_Extents> {};
|
||||
|
||||
bool OT::cff2::accelerator_t::get_extents (hb_codepoint_t glyph,
|
||||
hb_glyph_extents_t *extents,
|
||||
const int *coords,
|
||||
unsigned int num_coords) const
|
||||
bool OT::cff2::accelerator_t::get_extents (hb_font_t *font,
|
||||
hb_codepoint_t glyph,
|
||||
hb_glyph_extents_t *extents) const
|
||||
{
|
||||
if (unlikely (!is_valid () || (glyph >= num_glyphs))) return false;
|
||||
|
||||
unsigned int num_coords;
|
||||
const int *coords = hb_font_get_var_coords_normalized (font, &num_coords);
|
||||
unsigned int fd = fdSelect->get_fd (glyph);
|
||||
CFF2CSInterpreter<CFF2CSOpSet_Extents, ExtentsParam> interp;
|
||||
const ByteStr str = (*charStrings)[glyph];
|
||||
|
|
|
@ -534,10 +534,9 @@ struct cff2
|
|||
|
||||
struct accelerator_t : accelerator_templ_t<CFF2PrivateDictOpSet, CFF2PrivateDictValues>
|
||||
{
|
||||
HB_INTERNAL bool get_extents (hb_codepoint_t glyph,
|
||||
hb_glyph_extents_t *extents,
|
||||
const int *coords,
|
||||
unsigned int num_coords) const;
|
||||
HB_INTERNAL bool get_extents (hb_font_t *font,
|
||||
hb_codepoint_t glyph,
|
||||
hb_glyph_extents_t *extents) const;
|
||||
};
|
||||
|
||||
typedef accelerator_templ_t<CFF2PrivateDictOpSet_Subset, CFF2PrivateDictValues_Subset> accelerator_subset_t;
|
||||
|
|
|
@ -144,8 +144,7 @@ serialize_fdselect_3_4 (hb_serialize_context_t *c,
|
|||
const unsigned int num_glyphs,
|
||||
const FDSelect &src,
|
||||
unsigned int size,
|
||||
const hb_vector_t<code_pair> &fdselect_ranges,
|
||||
const Remap &fdmap)
|
||||
const hb_vector_t<code_pair> &fdselect_ranges)
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
FDSELECT3_4 *p = c->allocate_size<FDSELECT3_4> (size);
|
||||
|
@ -171,8 +170,7 @@ hb_serialize_cff_fdselect (hb_serialize_context_t *c,
|
|||
unsigned int fd_count,
|
||||
unsigned int fdselect_format,
|
||||
unsigned int size,
|
||||
const hb_vector_t<code_pair> &fdselect_ranges,
|
||||
const Remap &fdmap)
|
||||
const hb_vector_t<code_pair> &fdselect_ranges)
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
FDSelect *p = c->allocate_min<FDSelect> ();
|
||||
|
@ -207,16 +205,14 @@ hb_serialize_cff_fdselect (hb_serialize_context_t *c,
|
|||
num_glyphs,
|
||||
src,
|
||||
size,
|
||||
fdselect_ranges,
|
||||
fdmap);
|
||||
fdselect_ranges);
|
||||
|
||||
case 4:
|
||||
return serialize_fdselect_3_4<FDSelect4> (c,
|
||||
num_glyphs,
|
||||
src,
|
||||
size,
|
||||
fdselect_ranges,
|
||||
fdmap);
|
||||
fdselect_ranges);
|
||||
|
||||
default:
|
||||
assert(false);
|
||||
|
|
|
@ -932,7 +932,6 @@ hb_serialize_cff_fdselect (hb_serialize_context_t *c,
|
|||
unsigned int fd_count,
|
||||
unsigned int fdselect_format,
|
||||
unsigned int size,
|
||||
const hb_vector_t<CFF::code_pair> &fdselect_ranges,
|
||||
const CFF::Remap &fdmap);
|
||||
const hb_vector_t<CFF::code_pair> &fdselect_ranges);
|
||||
|
||||
#endif /* HB_SUBSET_CFF_COMMON_HH */
|
||||
|
|
|
@ -960,8 +960,7 @@ static inline bool _write_cff1 (const cff_subset_plan &plan,
|
|||
{
|
||||
if (unlikely (!hb_serialize_cff_fdselect (&c, glyphs.len, *acc.fdSelect, acc.fdCount,
|
||||
plan.subset_fdselect_format, plan.offsets.FDSelectInfo.size,
|
||||
plan.subset_fdselect_ranges,
|
||||
plan.fdmap)))
|
||||
plan.subset_fdselect_ranges)))
|
||||
{
|
||||
DEBUG_MSG (SUBSET, nullptr, "failed to serialize CFF subset FDSelect");
|
||||
return false;
|
||||
|
|
|
@ -372,8 +372,7 @@ static inline bool _write_cff2 (const cff2_subset_plan &plan,
|
|||
{
|
||||
if (unlikely (!hb_serialize_cff_fdselect (&c, glyphs.len, *(const FDSelect *)acc.fdSelect, acc.fdArray->count,
|
||||
plan.subset_fdselect_format, plan.offsets.FDSelectInfo.size,
|
||||
plan.subset_fdselect_ranges,
|
||||
plan.fdmap)))
|
||||
plan.subset_fdselect_ranges)))
|
||||
{
|
||||
DEBUG_MSG (SUBSET, nullptr, "failed to serialize CFF2 subset FDSelect");
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue