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

Can typora support Chinese fonts or 'otf' fonts? #6199

Open
rliangcn opened this issue Dec 24, 2024 · 0 comments
Open

Can typora support Chinese fonts or 'otf' fonts? #6199

rliangcn opened this issue Dec 24, 2024 · 0 comments

Comments

@rliangcn
Copy link

rliangcn commented Dec 24, 2024

Hi, I followed the instruction in typora support for customizing font in css.
It seems not work for me.

step 1.

I opened the themes folder, and created 'base.user.css' file, the contents in it is as follows:

/* latin */
@font-face {
    font-family: 'SourceHan';
    font-style: normal;
    font-weight: 400;
    src: local('SourceHan'), local('SourceHan-Medium'), url('./fonts/SourceHanSerifSC-Medium.otf') format('otf');
  }
  
  /* latin */
  @font-face {
    font-family: 'SourceHan';
    font-style: normal;
    font-weight: 700;
    src: local('SourceHan Bold'), local('SourceHan-Bold'), url('./fonts/SourceHanSerifSC-Bold.otf') format('otf');
  }
  
  body {
    font-family: 'SourceHan', sans-serif;
  }

image

step 2.

I created the 'fonts' folder inside 'themes' and copied the SourceHanSerifSC-Medium.otf file for debugging.
image

result

I saved the css file, restart typora, but the Chinese font seems not changed.

Am I wrong in some steps? or can typora support these sorts of fonts? Thanks

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

No branches or pull requests

1 participant