-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix fonts loading #9888
base: main
Are you sure you want to change the base?
Fix fonts loading #9888
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/6d890c3dcad56e67d9d84dc5a35c23fd15db377f/gradio-5.8.0-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@6d890c3dcad56e67d9d84dc5a35c23fd15db377f#subdirectory=client/python" Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/6d890c3dcad56e67d9d84dc5a35c23fd15db377f/gradio-client-1.8.0.tgz Use Lite from this PR <script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/6d890c3dcad56e67d9d84dc5a35c23fd15db377f/dist/lite.js""></script> |
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
This did not work for me. Try import gradio as gr
with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
name = gr.Textbox(label="Name")
greet_btn = gr.Button("Greet")
if __name__ == "__main__":
demo.launch(ssr_mode=True) and then also with |
@aliabid94 Where are you seeing that the fonts don't load? i don't see any console errors, and the fonts look the same to me in both ssr and non-ssr modes. (Although I only see the fonts load in front end built mode, not dev mode) |
@dawoodkhan82 Clearly, the computed CSS is asking to load the correct font but the browser is rendering with a different font. |
@abidlabs, as an aside but related to Line 2460 in 3a6151e
Line 1621 in 3a6151e
As yet another aside, the once SSR mode is enabled, a node server is started along with the Gradio server. However, at least on macOS (15.1.1), if I press Ctrl+C to stop the Gradio server, it keeps on waiting indefinitely to terminate the node process (with a message These should be addressed as separate issues, I guess. |
Description
Fixes system fonts not loading properly
Closes: #(issue)
🎯 PRs Should Target Issues
Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.
Not adhering to this guideline will result in the PR being closed.
Tests
PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests:
bash scripts/run_all_tests.sh
You may need to run the linters:
bash scripts/format_backend.sh
andbash scripts/format_frontend.sh