Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue in reverse_groups method #133

Merged
merged 2 commits into from
Sep 12, 2024
Merged

Conversation

LaurenzV
Copy link
Collaborator

Turns out I just copied it wrongly nested from harfbuzz... Whoops. 😅

Here is the original method, for reference:

  template <typename FuncType>
  void reverse_groups (const FuncType& group,
		       bool merge_clusters = false)
  {
    if (unlikely (!len))
      return;

    unsigned start = 0;
    unsigned i;
    for (i = 1; i < len; i++)
    {
      if (!group (info[i - 1], info[i]))
      {
	if (merge_clusters)
	  this->merge_clusters (start, i);
	reverse_range (start, i);
	start = i;
      }
    }
    if (merge_clusters)
      this->merge_clusters (start, i);
    reverse_range (start, i);

    reverse ();
  }

@RazrFalcon
Copy link
Collaborator

Turns out I just copied it wrongly nested from harfbuzz...

Yeah, if only HB used spaces for indents... I had similar issues as well. Eventually I simply reformatted the whole project during initial porting.

Is this related to #132?

@LaurenzV
Copy link
Collaborator Author

Is this related to #132?

Yes, it fixes that exact issue.

@RazrFalcon RazrFalcon merged commit 71e33a0 into harfbuzz:master Sep 12, 2024
2 checks passed
@RazrFalcon
Copy link
Collaborator

Thanks!

@LaurenzV LaurenzV deleted the rtl-fix branch September 12, 2024 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants