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%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec generate (shr_glyph:type()) -> {list(any())}.
generate (Glyph) ->
   {
      [
         {<<"msg">>, <<"acds_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))}
      ]
   }.