mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 15:01:01 +01:00
[VARC] Add SparseVarRegionAxis
This commit is contained in:
1 parent
ef04b5c259
commit
ae35e30bd2
1 file changed
+22
-2
@@ -2494,8 +2494,6 @@ struct VarRegionAxis
|
||||
{
|
||||
TRACE_SANITIZE (this);
|
||||
return_trace (c->check_struct (this));
|
||||
/* TODO Handle invalid start/peak/end configs, so we don't
|
||||
* have to do that at runtime. */
|
||||
}
|
||||
|
||||
bool serialize (hb_serialize_context_t *c) const
|
||||
@@ -2511,6 +2509,28 @@ struct VarRegionAxis
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (6);
|
||||
};
|
||||
struct SparseVarRegionAxis
|
||||
{
|
||||
float evaluate (int coord) const { return axis.evaluate (coord); }
|
||||
|
||||
bool sanitize (hb_sanitize_context_t *c) const
|
||||
{
|
||||
TRACE_SANITIZE (this);
|
||||
return_trace (c->check_struct (this));
|
||||
}
|
||||
|
||||
bool serialize (hb_serialize_context_t *c) const
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
return_trace (c->embed (this));
|
||||
}
|
||||
|
||||
public:
|
||||
HBUINT16 axisIndex;
|
||||
VarRegionAxis axis;
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (8);
|
||||
};
|
||||
|
||||
#define REGION_CACHE_ITEM_CACHE_INVALID 2.f
|
||||
|
||||
|
||||
Reference in new issue
Block a user