Skip to content

Conversation

@jeremywiebe
Copy link
Collaborator

Summary:

This PR adjusts the Symbola font references in Mathquill Less files to be relative paths. It also updates the build pipeline so that the generated CSS contains correct relative paths to these font files relative to the build output folder.

I also noticed that there was a reference to an .otf font file that no longer exists in the repo. It seems like this is just "code rot" as the code changed.

Issue: LEMS-3019

Test plan:

I ran the build and inspected the CSS and made sure that the relative font paths for Symbola resolved to the actual files in the build folder.

@basic:~ "";
.font-srcs() when not (@basic) {
src: url(/fonts/Symbola.eot);
src: url(../fonts/Symbola.eot);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are now the actual, relative paths to the font files. lessc can now resolve them properly when building.

Copy link
Member

@jeresig jeresig left a comment

Choose a reason for hiding this comment

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

Fantastic, thank you!

Copy link

@nedredmond nedredmond left a comment

Choose a reason for hiding this comment

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

Thanks, @jeremywiebe !

@nedredmond
Copy link

nedredmond commented Apr 16, 2025

Questions though:

  • What changed between now and when you did this same change and reverted it a year ago?
  • I see that in that revert PR, you bumped the version to 1.0.2, and in this PR you bumped in-code version references to 1.0.2 without bumping the package.json. If you meant to actually bump the version, shouldn't this be 1.0.3?

@jeremywiebe
Copy link
Collaborator Author

Questions though:

John asked the same question and I couldn't answer because I didn't take care to write things down as I was working. I remember hitting a wall in webapp when I went to integrate it though.

  • I see that in that revert PR, you bumped the version to 1.0.2, and in this PR you bumped in-code version references to 1.0.2 without bumping the package.json. If you meant to actually bump the version, shouldn't this be 1.0.3?

Good catch! I'll bump this PR to v1.0.3!

@jeremywiebe
Copy link
Collaborator Author

@nedredmond Oh, I remember now. When I did this originally I didn't update Perseus to properly bundle the fonts... and so I was fighting with the bundlers in webapp trying to find the fonts manually during bundling. This round, I've adjusted Perseus to properly bundle both mathquill CSS and fonts, so that the font references in the processed CSS are correct.

@jeremywiebe jeremywiebe merged commit c9e4329 into main Apr 16, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants