mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-29 01:23:56 +01:00
[shape-font] Simplify logic
This commit is contained in:
1 parent
d30d7f6b2b
commit
d515630f6b
1 file changed
+4
-1
+4
-1
@@ -431,8 +431,11 @@ struct hb_ot_font_data_t {
|
||||
hb_ot_font_data_t *
|
||||
_hb_ot_shaper_font_data_create (hb_font_t *font)
|
||||
{
|
||||
if (!font->num_coords)
|
||||
return (hb_ot_font_data_t *) HB_SHAPER_DATA_SUCCEEDED;
|
||||
|
||||
const OT::ItemVariationStore &var_store = font->face->table.GDEF->table->get_var_store ();
|
||||
auto *cache = font->num_coords ? (hb_ot_font_data_t *) var_store.create_cache () : nullptr;
|
||||
auto *cache = (hb_ot_font_data_t *) var_store.create_cache ();
|
||||
return cache ? cache : (hb_ot_font_data_t *) HB_SHAPER_DATA_SUCCEEDED;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user