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

Changing font failed if there are chinese characters in the font's name #1773

Closed
1 task done
LosikiS opened this issue Nov 30, 2019 · 2 comments
Closed
1 task done
Assignees
Labels
Projects

Comments

@LosikiS
Copy link

LosikiS commented Nov 30, 2019

Description

  • Can you reproduce the issue?

Steps to reproduce

1.Open the preferences and change font in the Editor tab, if there is a chinese character, this change is invalid.

Expected behavior: Change font successfully

Actual behavior: The font has not changed

Link to an example: [optional]
捕获
捕获2
捕获3

Versions

  • Mark Text: v0.16.0-rc.2
  • Operating system: Windows 10 1903
@fxha
Copy link
Contributor

fxha commented Dec 1, 2019

@Jocs Any ideas here? The issue is that we restrict the allowed font family name to ^[_A-z0-9]+((-|\s)*[_A-z0-9])*$ to prevent bad input and I also don't know whether Chromium supports non-ASCII font family names.

@Jocs
Copy link
Member

Jocs commented Dec 2, 2019

The issue is that we restrict the allowed font family name to ^[_A-z0-9]+((-|\s)[_A-z0-9])$ to prevent bad input and I also don't know whether Chromium supports non-ASCII font family names.

Yes, 微软雅黑 is an valid font family name, so I think we should not restrict the allowed font family name to ^[_A-z0-9]+((-|\s)*[_A-z0-9])*$. Maybe we only need to exclude some special characters?

@Jocs Jocs added this to TO-DO in 0.16.0 Dec 6, 2019
@fxha fxha mentioned this issue Jan 13, 2020
2 tasks
@Jocs Jocs moved this from TO-DO to Review in 0.16.0 Feb 8, 2020
@Jocs Jocs closed this as completed Feb 11, 2020
@Jocs Jocs moved this from Review to Done in 0.16.0 Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
0.16.0
  
Done
Development

No branches or pull requests

3 participants