[VARC] Avoid creating cache if there's no VARC table

This commit is contained in:
Behdad Esfahbod committed 2025-02-24 23:25:50 -07:00
1 parent d5d199fbc7
commit 47124e6337
1 file changed
+4
+4
View File
@@ -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;