Minor
This commit is contained in:
parent
b605db2f65
commit
03348ce005
@ -181,7 +181,7 @@ _get_mort (hb_face_t *face, hb_blob_t **blob = nullptr)
|
||||
*blob = hb_blob_get_empty ();
|
||||
return Null(AAT::mort);
|
||||
}
|
||||
const AAT::mort& mort = *(hb_ot_face_data (face)->mort.get ());
|
||||
const AAT::mort& mort = *(hb_ot_face_data (face)->mort);
|
||||
if (blob)
|
||||
*blob = hb_ot_face_data (face)->mort.get_blob ();
|
||||
return mort;
|
||||
@ -195,7 +195,7 @@ _get_morx (hb_face_t *face, hb_blob_t **blob = nullptr)
|
||||
*blob = hb_blob_get_empty ();
|
||||
return Null(AAT::morx);
|
||||
}
|
||||
const AAT::morx& morx = *(hb_ot_face_data (face)->morx.get ());
|
||||
const AAT::morx& morx = *(hb_ot_face_data (face)->morx);
|
||||
if (blob)
|
||||
*blob = hb_ot_face_data (face)->morx.get_blob ();
|
||||
return morx;
|
||||
@ -209,7 +209,7 @@ _get_kerx (hb_face_t *face, hb_blob_t **blob = nullptr)
|
||||
*blob = hb_blob_get_empty ();
|
||||
return Null(AAT::kerx);
|
||||
}
|
||||
const AAT::kerx& kerx = *(hb_ot_face_data (face)->kerx.get ());
|
||||
const AAT::kerx& kerx = *(hb_ot_face_data (face)->kerx);
|
||||
if (blob)
|
||||
*blob = hb_ot_face_data (face)->kerx.get_blob ();
|
||||
return kerx;
|
||||
@ -223,7 +223,7 @@ _get_ankr (hb_face_t *face, hb_blob_t **blob = nullptr)
|
||||
*blob = hb_blob_get_empty ();
|
||||
return Null(AAT::ankr);
|
||||
}
|
||||
const AAT::ankr& ankr = *(hb_ot_face_data (face)->ankr.get ());
|
||||
const AAT::ankr& ankr = *(hb_ot_face_data (face)->ankr);
|
||||
if (blob)
|
||||
*blob = hb_ot_face_data (face)->ankr.get_blob ();
|
||||
return ankr;
|
||||
@ -232,13 +232,13 @@ static inline const AAT::trak&
|
||||
_get_trak (hb_face_t *face)
|
||||
{
|
||||
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(AAT::trak);
|
||||
return *(hb_ot_face_data (face)->trak.get ());
|
||||
return *(hb_ot_face_data (face)->trak);
|
||||
}
|
||||
static inline const AAT::ltag&
|
||||
_get_ltag (hb_face_t *face)
|
||||
{
|
||||
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(AAT::ltag);
|
||||
return *(hb_ot_face_data (face)->ltag.get ());
|
||||
return *(hb_ot_face_data (face)->ltag);
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,35 +54,35 @@ static inline const OT::COLR&
|
||||
_get_colr (hb_face_t *face)
|
||||
{
|
||||
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::COLR);
|
||||
return *(hb_ot_face_data (face)->COLR.get ());
|
||||
return *(hb_ot_face_data (face)->COLR);
|
||||
}
|
||||
|
||||
static inline const OT::CBDT_accelerator_t&
|
||||
_get_cbdt (hb_face_t *face)
|
||||
{
|
||||
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::CBDT_accelerator_t);
|
||||
return *(hb_ot_face_data (face)->CBDT.get ());
|
||||
return *(hb_ot_face_data (face)->CBDT);
|
||||
}
|
||||
|
||||
static inline const OT::CPAL&
|
||||
_get_cpal (hb_face_t *face)
|
||||
{
|
||||
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::CPAL);
|
||||
return *(hb_ot_face_data (face)->CPAL.get ());
|
||||
return *(hb_ot_face_data (face)->CPAL);
|
||||
}
|
||||
|
||||
static inline const OT::sbix_accelerator_t&
|
||||
_get_sbix (hb_face_t *face)
|
||||
{
|
||||
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::sbix_accelerator_t);
|
||||
return *(hb_ot_face_data (face)->sbix.get ());
|
||||
return *(hb_ot_face_data (face)->sbix);
|
||||
}
|
||||
|
||||
static inline const OT::SVG_accelerator_t&
|
||||
_get_svg (hb_face_t *face)
|
||||
{
|
||||
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::SVG_accelerator_t);
|
||||
return *(hb_ot_face_data (face)->SVG.get ());
|
||||
return *(hb_ot_face_data (face)->SVG);
|
||||
}
|
||||
|
||||
|
||||
|
@ -62,7 +62,7 @@ hb_ot_get_nominal_glyph (hb_font_t *font HB_UNUSED,
|
||||
void *user_data HB_UNUSED)
|
||||
{
|
||||
const hb_ot_face_data_t *ot_face = (const hb_ot_face_data_t *) font_data;
|
||||
return ot_face->cmap.get ()->get_nominal_glyph (unicode, glyph);
|
||||
return ot_face->cmap->get_nominal_glyph (unicode, glyph);
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
@ -76,7 +76,7 @@ hb_ot_get_nominal_glyphs (hb_font_t *font HB_UNUSED,
|
||||
void *user_data HB_UNUSED)
|
||||
{
|
||||
const hb_ot_face_data_t *ot_face = (const hb_ot_face_data_t *) font_data;
|
||||
const OT::cmap_accelerator_t &cmap = *ot_face->cmap.get ();
|
||||
const OT::cmap_accelerator_t &cmap = *ot_face->cmap;
|
||||
unsigned int done;
|
||||
for (done = 0;
|
||||
done < count && cmap.get_nominal_glyph (*first_unicode, first_glyph);
|
||||
@ -97,7 +97,7 @@ hb_ot_get_variation_glyph (hb_font_t *font HB_UNUSED,
|
||||
void *user_data HB_UNUSED)
|
||||
{
|
||||
const hb_ot_face_data_t *ot_face = (const hb_ot_face_data_t *) font_data;
|
||||
return ot_face->cmap.get ()->get_variation_glyph (unicode, variation_selector, glyph);
|
||||
return ot_face->cmap->get_variation_glyph (unicode, variation_selector, glyph);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -110,7 +110,7 @@ hb_ot_get_glyph_h_advances (hb_font_t* font, void* font_data,
|
||||
void *user_data HB_UNUSED)
|
||||
{
|
||||
const hb_ot_face_data_t *ot_face = (const hb_ot_face_data_t *) font_data;
|
||||
const OT::hmtx_accelerator_t &hmtx = *ot_face->hmtx.get ();
|
||||
const OT::hmtx_accelerator_t &hmtx = *ot_face->hmtx;
|
||||
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
@ -130,7 +130,7 @@ hb_ot_get_glyph_v_advances (hb_font_t* font, void* font_data,
|
||||
void *user_data HB_UNUSED)
|
||||
{
|
||||
const hb_ot_face_data_t *ot_face = (const hb_ot_face_data_t *) font_data;
|
||||
const OT::vmtx_accelerator_t &vmtx = *ot_face->vmtx.get ();
|
||||
const OT::vmtx_accelerator_t &vmtx = *ot_face->vmtx;
|
||||
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
@ -152,7 +152,7 @@ hb_ot_get_glyph_v_origin (hb_font_t *font,
|
||||
|
||||
*x = font->get_glyph_h_advance (glyph) / 2;
|
||||
|
||||
const OT::VORG &VORG = *ot_face->VORG.get ();
|
||||
const OT::VORG &VORG = *ot_face->VORG;
|
||||
if (VORG.has_data ())
|
||||
{
|
||||
*y = font->em_scale_y (VORG.get_y_origin (glyph));
|
||||
@ -162,7 +162,7 @@ hb_ot_get_glyph_v_origin (hb_font_t *font,
|
||||
hb_glyph_extents_t extents = {0};
|
||||
if (ot_face->glyf->get_extents (glyph, &extents))
|
||||
{
|
||||
const OT::vmtx_accelerator_t &vmtx = *ot_face->vmtx.get ();
|
||||
const OT::vmtx_accelerator_t &vmtx = *ot_face->vmtx;
|
||||
hb_position_t tsb = vmtx.get_side_bearing (glyph);
|
||||
*y = font->em_scale_y (extents.y_bearing + tsb);
|
||||
return true;
|
||||
@ -225,7 +225,7 @@ hb_ot_get_font_h_extents (hb_font_t *font,
|
||||
void *user_data HB_UNUSED)
|
||||
{
|
||||
const hb_ot_face_data_t *ot_face = (const hb_ot_face_data_t *) font_data;
|
||||
const OT::hmtx_accelerator_t &hmtx = *ot_face->hmtx.get ();
|
||||
const OT::hmtx_accelerator_t &hmtx = *ot_face->hmtx;
|
||||
metrics->ascender = font->em_scale_y (hmtx.ascender);
|
||||
metrics->descender = font->em_scale_y (hmtx.descender);
|
||||
metrics->line_gap = font->em_scale_y (hmtx.line_gap);
|
||||
@ -240,7 +240,7 @@ hb_ot_get_font_v_extents (hb_font_t *font,
|
||||
void *user_data HB_UNUSED)
|
||||
{
|
||||
const hb_ot_face_data_t *ot_face = (const hb_ot_face_data_t *) font_data;
|
||||
const OT::vmtx_accelerator_t &vmtx = *ot_face->vmtx.get ();
|
||||
const OT::vmtx_accelerator_t &vmtx = *ot_face->vmtx;
|
||||
metrics->ascender = font->em_scale_x (vmtx.ascender);
|
||||
metrics->descender = font->em_scale_x (vmtx.descender);
|
||||
metrics->line_gap = font->em_scale_x (vmtx.line_gap);
|
||||
|
@ -62,7 +62,7 @@ _get_kern (hb_face_t *face, hb_blob_t **blob = nullptr)
|
||||
*blob = hb_blob_get_empty ();
|
||||
return Null(OT::kern);
|
||||
}
|
||||
const OT::kern& kern = *(hb_ot_face_data (face)->kern.get ());
|
||||
const OT::kern& kern = *(hb_ot_face_data (face)->kern);
|
||||
if (blob)
|
||||
*blob = hb_ot_face_data (face)->kern.get_blob ();
|
||||
return kern;
|
||||
|
@ -45,7 +45,7 @@ _get_math (hb_face_t *face)
|
||||
{
|
||||
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::MATH);
|
||||
hb_ot_face_data_t * data = hb_ot_face_data (face);
|
||||
return *(data->MATH.get ());
|
||||
return *(data->MATH);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -46,7 +46,7 @@ static inline const OT::name_accelerator_t&
|
||||
_get_name (hb_face_t *face)
|
||||
{
|
||||
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::name_accelerator_t);
|
||||
return *(hb_ot_face_data (face)->name.get ());
|
||||
return *(hb_ot_face_data (face)->name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -51,15 +51,13 @@ static inline const OT::fvar&
|
||||
_get_fvar (hb_face_t *face)
|
||||
{
|
||||
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::fvar);
|
||||
hb_ot_face_data_t *layout = hb_ot_face_data (face);
|
||||
return *(layout->fvar.get ());
|
||||
return *(hb_ot_face_data (face)->fvar);
|
||||
}
|
||||
static inline const OT::avar&
|
||||
_get_avar (hb_face_t *face)
|
||||
{
|
||||
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::avar);
|
||||
hb_ot_face_data_t *layout = hb_ot_face_data (face);
|
||||
return *(layout->avar.get ());
|
||||
return *(hb_ot_face_data (face)->avar);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user