-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Add Korean and Japanese font support for GIF rendering #1940
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cubic found 2 issues across 1 file. Review them in cubic.dev
React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai
to give specific feedback.
Help needed from Japanese/Chinese/Windows users to test the new GIF rendering! Please let me know if the text displays correctly for you. 🥺 |
👋 This PR has been automatically marked as stale because it hasn't had activity for 45 days. To keep this PR open:
This will be automatically closed in 14 days if no further activity occurs. Thanks for contributing to browser-use! 🤖 |
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@dohyun-ko Sorry we did not prioritize this so far. Can you solve the conflicts, I am happy to merge it! |
font_size = base_font_size | ||
|
||
larger_font = ImageFont.truetype(regular_font.path, font_size) | ||
larger_font = ImageFont.truetype(task_font.path, font_size) if hasattr(task_font, "path") else task_font |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Dynamic Font Sizing Fails Without Path
It looks like the dynamic font sizing for task text isn't working as expected when a default font is loaded. If task_font
lacks a path
attribute, the code uses task_font
directly, which means the dynamically calculated font_size
based on text length isn't applied. This can cause task text to render at an incorrect, non-dynamic size.
Hi - happy to take a look again if you resolve merge conflicts. Please try to keep the code clean and not AI-generated and separate the functions to acommodate for this scenario clearly. |
Summary
Problem
Solution
Known Issues & Limitations
Screenshots
Test Script
Summary by cubic
Added support for Korean and Japanese fonts in GIF rendering by detecting text language and selecting the correct font, so characters display properly.