Skip to content

Font enhancements #84

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

Merged
merged 34 commits into from
Jun 7, 2025
Merged

Font enhancements #84

merged 34 commits into from
Jun 7, 2025

Conversation

sprocketc
Copy link
Member

@sprocketc sprocketc commented May 31, 2025

Screencast.From.2025-06-07.12-45-24.mp4

This PR is mainly about allowing users to convert text elements to paths on web. This functionality was previously available on the electron app only. In order to do that, we use web APIs to get to the font data, and we also bundle a font with the app, to correctly convert text elements with the default font.

Resolves #79

The required changes also resulted in the following improvements

  • Noto Sans is bundled with the app, so the UI is now consistent across all operating systems
  • Text elements that don't use a system font family, can now be converted to paths using the bundled font
  • Font weight filtering based on the selected font-family also works on web
  • font-scanner dependency that was causing build failures form time to time because of its native nature, was removed
  • The preload script is now just a thin proxy between main and renderer
  • text->path conversion is now using a dom-element to get the size/weight/style to improve the conversion accuracy
  • Improved scaling of text elements
  • The canvas frame is now using theme css vars
  • Improved font related specs and tests

sprocketc added 4 commits May 31, 2025 09:53
- remove font-scanner and simplify gh actions
- build frame css and remove hardcoded values
- enhance input font styles
- add versions and env to preload
- wip text->path for web
- always use web apis to query local fonts
@sprocketc sprocketc force-pushed the font-enhancements branch from 96823d2 to 2373abb Compare June 4, 2025 16:54
@sprocketc sprocketc force-pushed the font-enhancements branch from 2373abb to f9c84a3 Compare June 4, 2025 16:55
@sprocketc sprocketc marked this pull request as ready for review June 6, 2025 14:24
@sprocketc sprocketc merged commit 4931704 into main Jun 7, 2025
5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Font enhancements
1 participant