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

Add a 4th font button and an API to set its font #55

Merged
merged 5 commits into from
Jan 16, 2022

Conversation

tswwe
Copy link

@tswwe tswwe commented Jan 15, 2022

Don't know why I can't create an issue in this repo. So I create a new issue at obsidian-excalidraw-plugin for potential further discussions. If I got something wrong or this is unneccessary, feel free to delete the issue.

tswwe and others added 5 commits January 15, 2022 16:06
The fourth font will break compatibility with excalidraw.com. I want people to deliberately turn the 4th font on in settings, and to not show the icon, unless it was turned on.
On the other hand, I will populate the fourth font with a default value (obsidian default font), but will not show the button unless the user turns it on... so if people exchange excalidraw.md files, it should display correctly, even if one user is using the fourth font option and the other is not.,
@zsviczian zsviczian merged commit 300cb9c into zsviczian:for-obsidian Jan 16, 2022
@zsviczian
Copy link
Owner

I didn't have issues enabled for this repository. Now I do.
Btw, we can have a discussion in the PR directly.

@zsviczian
Copy link
Owner

so I notice that doing my edits on GitHub, I wasn't thorough enough.
App.tsx has two errors that I corrected after merging:
declaration for showFourthFont is correctly

export let showFourthFont: boolean = false;

And declaration of setLocalFont is correctly:

  public setLocalFont: ExcalidrawImperativeAPI["setLocalFont"] = (
    url: string,
    showOnPanel: boolean,
  ) => {
    this.setLocalFontUrl(url, showOnPanel);
  };

@tswwe
Copy link
Author

tswwe commented Jan 16, 2022

I didn't have issues enabled for this repository. Now I do. Btw, we can have a discussion in the PR directly.

Yes, not did I recall that we can discuss directly in the PR before I submit it. Sorry for creating an unneccessary issue.

And thank you very much for improving the commits, making the functions much more robust and controllable.

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.

2 participants