mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-26 09:21:06 +01:00
[VARC] Avoid creating cache if there's no VARC table
This commit is contained in:
1 parent
d5d199fbc7
commit
47124e6337
1 file changed
+4
@@ -160,6 +160,8 @@ struct VARC
|
||||
bool
|
||||
get_path (hb_font_t *font, hb_codepoint_t gid, hb_draw_session_t &draw_session) const
|
||||
{
|
||||
if (!table->has_data ()) return false;
|
||||
|
||||
hb_glyf_scratch_t *scratch;
|
||||
|
||||
// Borrow the cached strach buffer.
|
||||
@@ -193,6 +195,8 @@ struct VARC
|
||||
hb_atomic_ptr_t<hb_glyf_scratch_t> cached_scratch;
|
||||
};
|
||||
|
||||
bool has_data () const { return version.major != 0; }
|
||||
|
||||
protected:
|
||||
FixedVersion<> version; /* Version identifier */
|
||||
Offset32To<Coverage> coverage;
|
||||
|
||||
Reference in new issue
Block a user