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%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec generate (shr_glyph:type()) -> {list(any())}.
generate (Glyph) ->
   {
      [
         {<<"msg">>, <<"add_glyph">>},
         {<<"id">>, shr_glyph:get_id(Glyph)},
         {<<"nam">>, shr_glyph:get_name(Glyph)},
         {<<"fam">>, shr_glyph:get_family_id(Glyph)},
         {<<"omni">>, shr_omnimods:encode(shr_glyph:get_omnimods(Glyph))}
      ]
   }.