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: Cannot read properties of undefined (reading 'getTransform') #766

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ahaoboy
Copy link

@ahaoboy ahaoboy commented Sep 25, 2024

Description

close: #765

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I did npm run test and all tests passed green (including code styling checks).
  • I have added tests to cover my changes.
  • My change requires a change to the documentation.
  • I have updated the README accordingly.
  • I have read the Contribute README section.

@Connum Connum self-requested a review March 13, 2025 18:11
@@ -161,7 +161,7 @@ <h1>Free Software</h1>
html += '<dt>leftSideBearing</dt><dd>'+glyph.leftSideBearing+'</dd>';
}
html += '</dl>';
if (glyph.numberOfContours > 0) {
if (glyph.numberOfContours > 0 && window.font.variation) {
Copy link
Contributor

Choose a reason for hiding this comment

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

But couldn't there be glyphs with multiple contours but no variation axes? So I think the check for window.font.variation should happen inside, and depending on its availability, either the regular glyph or the transformed variant should be used.

Copy link
Author

Choose a reason for hiding this comment

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

I’m not very familiar with this professional knowledge. I only encountered this issue during use, so there might be some oversights in the fix. Thank you for pointing it out.

@Connum
Copy link
Contributor

Connum commented Mar 13, 2025

Good catch! Please see my review comment!

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.

Cannot read properties of undefined (reading 'getTransform')
2 participants