[ot-font] Rename

This commit is contained in:
Behdad Esfahbod 2018-08-26 00:06:12 -07:00
parent 1c48a7ef06
commit 59bca0d2cb
2 changed files with 18 additions and 18 deletions

View File

@ -135,8 +135,8 @@ struct hb_ot_face_data_t
{
this->face = face;
cmap.init0 ();
h_metrics.init0 ();
v_metrics.init0 ();
hmtx.init0 ();
vmtx.init0 ();
glyf.init0 ();
cbdt.init0 ();
post.init0 ();
@ -145,8 +145,8 @@ struct hb_ot_face_data_t
inline void fini (void)
{
cmap.fini ();
h_metrics.fini ();
v_metrics.fini ();
hmtx.fini ();
vmtx.fini ();
glyf.fini ();
cbdt.fini ();
post.fini ();
@ -155,8 +155,8 @@ struct hb_ot_face_data_t
hb_face_t *face; /* MUST be JUST before the lazy loaders. */
hb_face_lazy_loader_t<1, OT::cmap::accelerator_t> cmap;
hb_face_lazy_loader_t<2, OT::hmtx::accelerator_t> h_metrics;
hb_face_lazy_loader_t<3, OT::vmtx::accelerator_t> v_metrics;
hb_face_lazy_loader_t<2, OT::hmtx::accelerator_t> hmtx;
hb_face_lazy_loader_t<3, OT::vmtx::accelerator_t> vmtx;
hb_face_lazy_loader_t<4, OT::glyf::accelerator_t> glyf;
hb_face_lazy_loader_t<5, OT::CBDT::accelerator_t> cbdt;
hb_face_lazy_loader_t<6, OT::post::accelerator_t> post;

View File

@ -67,7 +67,7 @@ hb_ot_get_glyph_h_advance (hb_font_t *font,
void *user_data HB_UNUSED)
{
const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
return font->em_scale_x (ot_font->h_metrics.get_relaxed ()->get_advance (glyph, font));
return font->em_scale_x (ot_font->hmtx.get_relaxed ()->get_advance (glyph, font));
}
static hb_position_t
@ -77,7 +77,7 @@ hb_ot_get_glyph_v_advance (hb_font_t *font,
void *user_data HB_UNUSED)
{
const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
return font->em_scale_y (-(int) ot_font->v_metrics.get_relaxed ()->get_advance (glyph, font));
return font->em_scale_y (-(int) ot_font->vmtx.get_relaxed ()->get_advance (glyph, font));
}
static hb_position_t
@ -139,11 +139,11 @@ hb_ot_get_font_h_extents (hb_font_t *font,
void *user_data HB_UNUSED)
{
const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
metrics->ascender = font->em_scale_y (ot_font->h_metrics.get_relaxed ()->ascender);
metrics->descender = font->em_scale_y (ot_font->h_metrics.get_relaxed ()->descender);
metrics->line_gap = font->em_scale_y (ot_font->h_metrics.get_relaxed ()->line_gap);
metrics->ascender = font->em_scale_y (ot_font->hmtx.get_relaxed ()->ascender);
metrics->descender = font->em_scale_y (ot_font->hmtx.get_relaxed ()->descender);
metrics->line_gap = font->em_scale_y (ot_font->hmtx.get_relaxed ()->line_gap);
// TODO Hook up variations.
return ot_font->h_metrics.get_relaxed ()->has_font_extents;
return ot_font->hmtx.get_relaxed ()->has_font_extents;
}
static hb_bool_t
@ -153,11 +153,11 @@ hb_ot_get_font_v_extents (hb_font_t *font,
void *user_data HB_UNUSED)
{
const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
metrics->ascender = font->em_scale_x (ot_font->v_metrics.get_relaxed ()->ascender);
metrics->descender = font->em_scale_x (ot_font->v_metrics.get_relaxed ()->descender);
metrics->line_gap = font->em_scale_x (ot_font->v_metrics.get_relaxed ()->line_gap);
metrics->ascender = font->em_scale_x (ot_font->vmtx.get_relaxed ()->ascender);
metrics->descender = font->em_scale_x (ot_font->vmtx.get_relaxed ()->descender);
metrics->line_gap = font->em_scale_x (ot_font->vmtx.get_relaxed ()->line_gap);
// TODO Hook up variations.
return ot_font->v_metrics.get_relaxed ()->has_font_extents;
return ot_font->vmtx.get_relaxed ()->has_font_extents;
}
#ifdef HB_USE_ATEXIT
@ -223,8 +223,8 @@ hb_ot_font_set_funcs (hb_font_t *font)
/* Load them lazies. We access them with get_relaxed() for performance. */
ot_font->cmap.get ();
ot_font->h_metrics.get ();
ot_font->v_metrics.get ();
ot_font->hmtx.get ();
ot_font->vmtx.get ();
hb_font_set_funcs (font,
_hb_ot_get_font_funcs (),