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: Apply temporary logic to apply missing fonts in the current excalidraw package #56

Merged
merged 7 commits into from
Sep 2, 2024

Conversation

kei95
Copy link
Contributor

@kei95 kei95 commented Aug 9, 2024

Issue

#55

What the change is about

It turned out that the @excalidraw/excalidraw package is way behind the released app version, hence the issue as the package doesn't know any added fonts that are present in the app. This PR adds fonts and logic to apply missing fonts and adopt newly added fonts so that this app can display any fonts in the current version of the excalidraw.

@dai-shi This is a bit of an ugly patch-up to manually apply missing fonts in the package until we get the update from Excalidraw. It at least does its job to adopt the fonts but I'd say it's up to you to have this change meanwhile or wait for their update without it!

Screenshot / Gif

Base canvas in Excalidraw
Screenshot 2024-08-08 at 5 46 00 PM

Imported svg
2024-08-08 17 34 53

dai-shi added a commit that referenced this pull request Aug 9, 2024
@dai-shi
Copy link
Owner

dai-shi commented Aug 9, 2024

Thanks for the investigation! Yeah, let's wait for the upstream fix.

Meanwhile, I manually deployed https://dai-shi.github.io/excalidraw-animate/ from this branch.

@kei95
Copy link
Contributor Author

kei95 commented Aug 9, 2024

Thanks for the investigation! Yeah, let's wait for the upstream fix.

Meanwhile, I manually deployed https://dai-shi.github.io/excalidraw-animate/ from this branch.

Sounds good. Feel free to close this PR if it's no longer needed then

@dai-shi
Copy link
Owner

dai-shi commented Aug 9, 2024

Let's keep it open.

dai-shi added a commit that referenced this pull request Aug 14, 2024
@kei95
Copy link
Contributor Author

kei95 commented Sep 2, 2024

@dai-shi Here is the updated version of this branch! I have changed;

Gif

2024-09-02 10 29 38

@dai-shi dai-shi linked an issue Sep 2, 2024 that may be closed by this pull request
Copy link
Owner

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

You know what, let's merge this.
I'm confident that you will update this once Excalidraw package is updated, so in the meantime, let's go with this.
@kei95 Great work!

@dai-shi dai-shi merged commit dfc5a01 into dai-shi:main Sep 2, 2024
1 check passed
@dai-shi
Copy link
Owner

dai-shi commented Sep 2, 2024

Feel free to send more PRs to improve things.

@kei95 kei95 deleted the fix/patch-up-fonts branch September 2, 2024 01:51
@dangehub
Copy link

dangehub commented Sep 6, 2024

Hi, Does this PR only fix the rendering issue on the web?

If I choose to 'export to SVG', will I get

bug? .

It seems similar to a web rendering bug before the PR submission, here I used the Excalidraw file shared in issue#55

@dai-shi
Copy link
Owner

dai-shi commented Sep 7, 2024

probably so? @kei95

@kei95
Copy link
Contributor Author

kei95 commented Sep 7, 2024

@dangehub That's right svg export is out of the scope for this PR

@dangehub
Copy link

dangehub commented Sep 8, 2024

@dangehub That's right svg export is out of the scope for this PR

I fixed the bug where other fonts didn't work when exporting to SVG.

Additionally, my branch now supports third-party fonts (for compatibility with obsidian-excalidraw), maybe I can pr ?

test-fix

@dai-shi
Copy link
Owner

dai-shi commented Sep 8, 2024

yeah, please open a pr.

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.

Font isn't displaying correctly
3 participants