Skip to content

[shaping] add Advance; deprecate some other fields - #219

Merged
andydotxyz merged 1 commit into
mainfrom
glyph-struct-api
Feb 2, 2026
Merged

andydotxyz merged 1 commit into
mainfrom
glyph-struct-api

Conversation

@benoitkugler

Copy link
Copy Markdown
Contributor

This implements the transition path discussed in #210.

I've tried and make the minimal changes so that tests pass. As proposed, this PR

  • adds methods Glyph.TextIndex() int, Glyph.RunesCount() int, Glyph.GlyphsCount() int
  • adds a field Glyph.Advance
  • deprecates XAdvance, YAdvance, ClusterIndex, RuneCount, GlyphCount fields

@whereswaldon whereswaldon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I look forward to the savings this will enable.

@benoitkugler

Copy link
Copy Markdown
Contributor Author

@andydotxyz Any chance you could have a look at these changes? It would be nice to publish them and start updating users codebases.

@andydotxyz andydotxyz left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry this escaped me in a holiday catchup.

Thanks for putting the effort into a migration path.

Perhaps we could/should now tag a release and note that it's the last one supporting these deprecated fields?

@andydotxyz
andydotxyz merged commit c3ca867 into main Feb 2, 2026
14 checks passed
@benoitkugler
benoitkugler deleted the glyph-struct-api branch September 29, 2026 08:26
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.

3 participants