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 option to change CJK fonts to SourceHanSerif #337

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

timelic
Copy link

@timelic timelic commented Dec 25, 2024

添加更改中日韩字体为思源宋体的选项,以统一 Windows、Linux 和 Mac 系统上的阅读体验。

#271

需要在gradio上的帮助,因为我不太熟悉gradio。

@timelic timelic marked this pull request as draft December 25, 2024 04:09
@awwaawwa
Copy link
Contributor

I see you wrote ttf_path = os.environ.get("SHS_FONT_PATH", "/app/SourceHanSerif-Medium.ttc") in the code, but you didn't make the corresponding changes to the Dockerfile. Can you add an ADD instruction like Dockerfile#L9C1-L10C1 to download the font into the Docker image?

@timelic
Copy link
Author

timelic commented Dec 25, 2024

@awwaawwa Yes, I have added the font to the Dockerfile.

@timelic
Copy link
Author

timelic commented Dec 25, 2024

@awwaawwa 问题在于我们需要在docker里面下载字体吗?包括Noto,似乎都不是必须下载的。按需加载就好?

@awwaawwa
Copy link
Contributor

由于奇奇怪怪的网络原因,部署docker的机器不一定能顺利下载到字体

@timelic
Copy link
Author

timelic commented Dec 25, 2024

由于奇奇怪怪的网络原因,部署docker的机器不一定能顺利下载到字体

原来如此,那确实需要考虑这方面。

@timelic
Copy link
Author

timelic commented Dec 25, 2024

@hellofinch 请求在gradio前端方面得到帮助🙏 我尝试了但是感觉效果不好

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