[OT] Remove hb_ot_layout_ensure()
I didn't like it from the beginning.
This commit is contained in:
parent
578e42182b
commit
11f4c87d01
|
@ -39,7 +39,8 @@
|
||||||
|
|
||||||
|
|
||||||
HB_SHAPER_DATA_ENSURE_DECLARE(ot, face)
|
HB_SHAPER_DATA_ENSURE_DECLARE(ot, face)
|
||||||
hb_bool_t
|
|
||||||
|
static hb_bool_t
|
||||||
hb_ot_layout_ensure (hb_face_t *face)
|
hb_ot_layout_ensure (hb_face_t *face)
|
||||||
{
|
{
|
||||||
return hb_ot_shaper_face_data_ensure (face);
|
return hb_ot_shaper_face_data_ensure (face);
|
||||||
|
@ -76,19 +77,19 @@ _hb_ot_layout_destroy (hb_ot_layout_t *layout)
|
||||||
static inline const GDEF&
|
static inline const GDEF&
|
||||||
_get_gdef (hb_face_t *face)
|
_get_gdef (hb_face_t *face)
|
||||||
{
|
{
|
||||||
/* XXX ensure ot_layout, and speed up */
|
if (unlikely (!hb_ot_layout_ensure (face))) return Null(GDEF);
|
||||||
return *hb_ot_layout_from_face (face)->gdef;
|
return *hb_ot_layout_from_face (face)->gdef;
|
||||||
}
|
}
|
||||||
static inline const GSUB&
|
static inline const GSUB&
|
||||||
_get_gsub (hb_face_t *face)
|
_get_gsub (hb_face_t *face)
|
||||||
{
|
{
|
||||||
/* XXX ensure ot_layout, and speed up */
|
if (unlikely (!hb_ot_layout_ensure (face))) return Null(GSUB);
|
||||||
return *hb_ot_layout_from_face (face)->gsub;
|
return *hb_ot_layout_from_face (face)->gsub;
|
||||||
}
|
}
|
||||||
static inline const GPOS&
|
static inline const GPOS&
|
||||||
_get_gpos (hb_face_t *face)
|
_get_gpos (hb_face_t *face)
|
||||||
{
|
{
|
||||||
/* XXX ensure ot_layout, and speed up */
|
if (unlikely (!hb_ot_layout_ensure (face))) return Null(GPOS);
|
||||||
return *hb_ot_layout_from_face (face)->gpos;
|
return *hb_ot_layout_from_face (face)->gpos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,11 +43,6 @@ HB_BEGIN_DECLS
|
||||||
#define HB_OT_TAG_GPOS HB_TAG('G','P','O','S')
|
#define HB_OT_TAG_GPOS HB_TAG('G','P','O','S')
|
||||||
|
|
||||||
|
|
||||||
/* Must call before all other funtions in this file. Idempotent. */
|
|
||||||
hb_bool_t
|
|
||||||
hb_ot_layout_ensure (hb_face_t *face);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GDEF
|
* GDEF
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue