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

[Feature Request] Better font size support #254

Open
kxxoling opened this issue Oct 24, 2022 · 6 comments
Open

[Feature Request] Better font size support #254

kxxoling opened this issue Oct 24, 2022 · 6 comments
Labels
feature-request New feature or request

Comments

@kxxoling
Copy link

Is your feature request related to a problem? Please describe.

The texts on my GPD WinMax2 which has an 10 inches 2K screen is almost unreadable

Describe the solution you'd like

Use system font sizes to define texts and figures instead of fixed ones

Describe alternatives you've considered

A built in theme for small screens.

Additional context

The reference object is AirPods pro, which is 30.9mm tall and 21.8mm wide:

IMG_4334

IMG_4333

@kxxoling kxxoling added the feature-request New feature or request label Oct 24, 2022
@loathingKernel
Copy link
Contributor

loathingKernel commented Oct 24, 2022

Use system font sizes to define texts and figures instead of fixed ones

Font sizes are not fixed, in the sense that Qt should scale them accordingly when it is run in a HiDPi screen.

Your device is HIDPi but the UI doesn't seem to scale accordingly (it should but we have tested this mostly on Linux). Can you try launching with QT_SCALE_FACTOR=2 set in your environment?

@loathingKernel
Copy link
Contributor

Looking at the screenshots more closely, the icons seem to be already adjusted to HiDPi, but the fonts, are not. Given that most metrics are inferred from font glyphs, could that be the source of the problem? What font is this (is it CJK?), have you manually adjusted it and does it happen with the default fonts?

@kxxoling
Copy link
Author

@loathingKernel I cannot start it anymore after a few games installed and then it crashed for unknown reason. It's always stucking at startup. Where can I get the logs?

@loathingKernel
Copy link
Contributor

Logs can be found in C:\Users\<username>\AppData\Local\Rare\Rare\cache\logs

@kxxoling
Copy link
Author

Error logs is related to api.legendary.gl API:

[RareApp] INFO: Launching Rare version 1.9.1
[RareApp] INFO: Operating System: Windows
[RareApp] INFO: Your language is supported: zh-Hans
[Rare] CRITICAL: Traceback (most recent call last):
  File "C:\Users\lenna\PycharmProjects\Rare\rare\utils\misc.py", line 395, in run
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\legendary\core.py", line 788, in get_save_games
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\legendary\api\egs.py", line 244, in get_user_cloud_saves
AttributeError: 'NoneType' object has no attribute 'get'

[Rare] CRITICAL: Traceback (most recent call last):
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py", line 414, in connect
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 500, in wrap_socket
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 1040, in _create
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 1309, in do_handshake
socket.timeout: _ssl.c:1112: The handshake operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 489, in send
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\retry.py", line 550, in increment
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\packages\six.py", line 770, in reraise
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 389, in _make_request
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 340, in _raise_timeout
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.legendary.gl', port=443): Read timed out. (read timeout=10.0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\Lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 120, in run
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\Lib\site-packages\cx_Freeze\initscripts\Console.py", line 16, in run
  File "rare\__main__.py", line 131, in <module>
  File "rare\__main__.py", line 106, in main
  File "C:\Users\lenna\PycharmProjects\Rare\rare\app.py", line 129, in start
  File "C:\Users\lenna\PycharmProjects\Rare\rare\app.py", line 74, in __init__
  File "C:\Users\lenna\PycharmProjects\Rare\rare\components\dialogs\launch_dialog.py", line 186, in login
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\legendary\core.py", line 268, in check_for_updates
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\legendary\api\lgd.py", line 21, in get_version_information
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 600, in get
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 587, in request
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 701, in send
  File "C:\Users\lenna\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 578, in send
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.legendary.gl', port=443): Read timed out. (read timeout=10.0)

What is strange is that lenna is not my username.

QT_SCALE makes it looks better now but still not perfect. As I can remember, the default Chinese font is yahei which is different from this:

image
I will dig into this further later. Thanks for your help!

@loathingKernel
Copy link
Contributor

The error that made Rare not launch seems to be related to network availability. Rare has an offline mode but it has fell into disrepair over time.

lenna is the username of @Dummerle and it is an artifact of how the msi installer is packaged with cx_freeze, nothing to worry about.

I see what you mean about the UI not scaling properly. I have been doing some tests since the bug report and we are working on it but since personally I don't have a HiDPI display, I can't really test it thoroughly. Progress might be slow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants