       end
     end)
 
+  # for {k, v} <- cluster do
+  #   IO.puts "#{k}:#{length(v)}"
+  # end
+
   # Don't break CRLF
   def next_grapheme_size(<<?\r, ?\n, rest::binary>>) do
     {2, rest}

    {size, rest}
  end

  # Handle Pictographic (always after zwj, falls back to extend size)
  for codepoint <- cluster["Extended_Pictographic"] do
    defp next_pictographic_size(<<unquote(codepoint), rest::binary>>, size) do
      next_extend_size(rest, size + unquote(byte_size(codepoint)), :emoji)
    end
  end

  defp next_pictographic_size(rest, size) do
    next_extend_size(rest, size, :other)
  end

  defp keep_emoji(:emoji), do: :emoji
  defp keep_emoji(_), do: :other


  end

  # Handle Extend+SpacingMark+ZWJ
  defp next_extend_size(<<cp, _::binary>> = rest, size, _maker) when cp <= 0x007F do
    {size, rest}
  end

  for codepoint <- cluster["Extend"] do
    defp next_extend_size(<<unquote(codepoint), rest::binary>>, size, marker) do
      next_extend_size(rest, size + unquote(byte_size(codepoint)), keep_emoji(marker))
