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

fontFamily should be configurable #787

Open
OR13 opened this issue Jun 19, 2022 · 6 comments
Open

fontFamily should be configurable #787

OR13 opened this issue Jun 19, 2022 · 6 comments
Labels
Enhancement Enhance performance or improve usability of original features. Need Discussion Need discussion or investigation

Comments

@OR13
Copy link

OR13 commented Jun 19, 2022

Version

    "@toast-ui/react-image-editor": "^3.15.2",

Development Environment

macOS / chrome.

Current Behavior

const fontFamily = 'Noto Sans';

Expected Behavior

Expect to be able to configure font family defaults when editor is initialized.

@OR13 OR13 added Enhancement Enhance performance or improve usability of original features. Need Discussion Need discussion or investigation labels Jun 19, 2022
@OR13 OR13 changed the title Font Family should be configurable fontFamily should be configurable Jun 19, 2022
@OR13
Copy link
Author

OR13 commented Jun 19, 2022

I used this work around:

 editor.on("objectActivated", function (props: any) {
        setTimeout(() => {
          if (props.fontFamily !== defaultFontFamily) {
            editor.changeTextStyle(props.id, {
              fontFamily: defaultFontFamily,
            });
          }
        }, 500);
      });

@lja1018
Copy link
Contributor

lja1018 commented Jul 13, 2022

@OR13
Is it only added to react-image-editor?

@OR13
Copy link
Author

OR13 commented Jul 13, 2022

My work around is only for the editor.

@lja1018
Copy link
Contributor

lja1018 commented Jul 14, 2022

@OR13
You mean not only react-image-editor but also image-editor core, right?

@OR13
Copy link
Author

OR13 commented Jul 14, 2022

Yes, I think so.

@lja1018
Copy link
Contributor

lja1018 commented Aug 2, 2022

@OR13
Thank you for the report. I'll add it to TODO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Enhance performance or improve usability of original features. Need Discussion Need discussion or investigation
Projects
None yet
Development

No branches or pull requests

2 participants