Shuffle things around a bit
This commit is contained in:
parent
fc8189b639
commit
466b3e58bd
|
@ -69,8 +69,8 @@ hb_coretext_face_create (CGFontRef cg_font)
|
|||
}
|
||||
|
||||
|
||||
HB_SHAPER_DATA_ENSURE_DECLARE(coretext, face)
|
||||
HB_SHAPER_DATA_ENSURE_DECLARE(coretext, font)
|
||||
HB_SHAPER_DATA_ENSURE_DEFINE(coretext, face)
|
||||
HB_SHAPER_DATA_ENSURE_DEFINE(coretext, font)
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
#define HB_DEBUG_DIRECTWRITE (HB_DEBUG+0)
|
||||
#endif
|
||||
|
||||
HB_SHAPER_DATA_ENSURE_DECLARE(directwrite, face)
|
||||
HB_SHAPER_DATA_ENSURE_DECLARE(directwrite, font)
|
||||
HB_SHAPER_DATA_ENSURE_DEFINE(directwrite, face)
|
||||
HB_SHAPER_DATA_ENSURE_DEFINE(directwrite, font)
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
#include "hb-shaper-impl-private.hh"
|
||||
|
||||
|
||||
HB_SHAPER_DATA_ENSURE_DEFINE(fallback, face)
|
||||
HB_SHAPER_DATA_ENSURE_DEFINE(fallback, font)
|
||||
|
||||
|
||||
/*
|
||||
* shaper face data
|
||||
*/
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
#include <graphite2/Segment.h>
|
||||
|
||||
|
||||
HB_SHAPER_DATA_ENSURE_DECLARE(graphite2, face)
|
||||
HB_SHAPER_DATA_ENSURE_DECLARE(graphite2, font)
|
||||
HB_SHAPER_DATA_ENSURE_DEFINE(graphite2, face)
|
||||
HB_SHAPER_DATA_ENSURE_DEFINE(graphite2, font)
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -623,5 +623,4 @@ _hb_buffer_assert_gsubgpos_vars (hb_buffer_t *buffer)
|
|||
#undef lig_props
|
||||
#undef glyph_props
|
||||
|
||||
|
||||
#endif /* HB_OT_LAYOUT_PRIVATE_HH */
|
||||
|
|
|
@ -39,8 +39,6 @@
|
|||
#include "hb-ot-map-private.hh"
|
||||
|
||||
|
||||
HB_SHAPER_DATA_ENSURE_DECLARE(ot, face)
|
||||
|
||||
hb_ot_layout_t *
|
||||
_hb_ot_layout_create (hb_face_t *face)
|
||||
{
|
||||
|
|
|
@ -26,10 +26,9 @@
|
|||
|
||||
#include "hb-open-type-private.hh"
|
||||
|
||||
#include "hb-ot-layout-private.hh"
|
||||
#include "hb-ot-math-table.hh"
|
||||
|
||||
HB_SHAPER_DATA_ENSURE_DECLARE(ot, face)
|
||||
|
||||
static inline const OT::MATH&
|
||||
_get_math (hb_face_t *face)
|
||||
{
|
||||
|
|
|
@ -128,6 +128,8 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
|
|||
* shaper face data
|
||||
*/
|
||||
|
||||
HB_SHAPER_DATA_ENSURE_DEFINE(ot, face)
|
||||
|
||||
hb_ot_shaper_face_data_t *
|
||||
_hb_ot_shaper_face_data_create (hb_face_t *face)
|
||||
{
|
||||
|
@ -145,6 +147,8 @@ _hb_ot_shaper_face_data_destroy (hb_ot_shaper_face_data_t *data)
|
|||
* shaper font data
|
||||
*/
|
||||
|
||||
HB_SHAPER_DATA_ENSURE_DEFINE(ot, font)
|
||||
|
||||
struct hb_ot_shaper_font_data_t {};
|
||||
|
||||
hb_ot_shaper_font_data_t *
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
#include "hb-ot-var-mvar-table.hh"
|
||||
#include "hb-ot-var.h"
|
||||
|
||||
HB_SHAPER_DATA_ENSURE_DECLARE(ot, face)
|
||||
|
||||
/*
|
||||
* fvar/avar
|
||||
*/
|
||||
|
|
|
@ -35,13 +35,6 @@
|
|||
#endif
|
||||
|
||||
|
||||
#define HB_SHAPER_IMPLEMENT(shaper) \
|
||||
HB_SHAPER_DATA_ENSURE_DECLARE(shaper, face) \
|
||||
HB_SHAPER_DATA_ENSURE_DECLARE(shaper, font)
|
||||
#include "hb-shaper-list.hh"
|
||||
#undef HB_SHAPER_IMPLEMENT
|
||||
|
||||
|
||||
static void
|
||||
hb_shape_plan_plan (hb_shape_plan_t *shape_plan,
|
||||
const hb_feature_t *user_features,
|
||||
|
|
|
@ -71,22 +71,25 @@ struct hb_shaper_data_t {
|
|||
#define HB_SHAPER_DATA(shaper, object) HB_SHAPER_DATA_INSTANCE(shaper, object, object)
|
||||
#define HB_SHAPER_DATA_CREATE_FUNC(shaper, object) _hb_##shaper##_shaper_##object##_data_create
|
||||
#define HB_SHAPER_DATA_DESTROY_FUNC(shaper, object) _hb_##shaper##_shaper_##object##_data_destroy
|
||||
#define HB_SHAPER_DATA_ENSURE_FUNC(shaper, object) hb_##shaper##_shaper_##object##_data_ensure
|
||||
|
||||
#define HB_SHAPER_DATA_PROTOTYPE(shaper, object) \
|
||||
HB_SHAPER_DATA_TYPE (shaper, object); /* Type forward declaration. */ \
|
||||
extern "C" HB_INTERNAL HB_SHAPER_DATA_TYPE (shaper, object) * \
|
||||
HB_SHAPER_DATA_CREATE_FUNC (shaper, object) (hb_##object##_t *object HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS); \
|
||||
extern "C" HB_INTERNAL void \
|
||||
HB_SHAPER_DATA_DESTROY_FUNC (shaper, object) (HB_SHAPER_DATA_TYPE (shaper, object) *data)
|
||||
HB_SHAPER_DATA_DESTROY_FUNC (shaper, object) (HB_SHAPER_DATA_TYPE (shaper, object) *data); \
|
||||
extern "C" HB_INTERNAL bool \
|
||||
HB_SHAPER_DATA_ENSURE_FUNC (shaper, object) (hb_##object##_t *object)
|
||||
|
||||
#define HB_SHAPER_DATA_DESTROY(shaper, object) \
|
||||
if (HB_SHAPER_DATA_TYPE (shaper, object) *data = HB_SHAPER_DATA (shaper, object)) \
|
||||
if (data != HB_SHAPER_DATA_INVALID && data != HB_SHAPER_DATA_SUCCEEDED) \
|
||||
HB_SHAPER_DATA_DESTROY_FUNC (shaper, object) (data);
|
||||
|
||||
#define HB_SHAPER_DATA_ENSURE_DECLARE(shaper, object) \
|
||||
static inline bool \
|
||||
hb_##shaper##_shaper_##object##_data_ensure (hb_##object##_t *object) \
|
||||
#define HB_SHAPER_DATA_ENSURE_DEFINE(shaper, object) \
|
||||
bool \
|
||||
HB_SHAPER_DATA_ENSURE_FUNC(shaper, object) (hb_##object##_t *object) \
|
||||
{\
|
||||
retry: \
|
||||
HB_SHAPER_DATA_TYPE (shaper, object) *data = (HB_SHAPER_DATA_TYPE (shaper, object) *) hb_atomic_ptr_get (&HB_SHAPER_DATA (shaper, object)); \
|
||||
|
|
|
@ -293,8 +293,8 @@ struct range_record_t {
|
|||
unsigned int index_last; /* == end - 1 */
|
||||
};
|
||||
|
||||
HB_SHAPER_DATA_ENSURE_DECLARE(uniscribe, face)
|
||||
HB_SHAPER_DATA_ENSURE_DECLARE(uniscribe, font)
|
||||
HB_SHAPER_DATA_ENSURE_DEFINE(uniscribe, face)
|
||||
HB_SHAPER_DATA_ENSURE_DEFINE(uniscribe, font)
|
||||
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue