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

mangohud: invalid font_file declaration #308

Open
1 of 2 tasks
trueNAHO opened this issue Mar 27, 2024 · 4 comments
Open
1 of 2 tasks

mangohud: invalid font_file declaration #308

trueNAHO opened this issue Mar 27, 2024 · 4 comments
Labels
C-tracking-issue Category: A tracking issue

Comments

@trueNAHO
Copy link
Collaborator

trueNAHO commented Mar 27, 2024

About

This tracking issue manages the font_file hotfix, resolving:

Steps

  1. mangohud: hotfix remove font_file #307
  2. mangohud: declare 'font_file'
@trueNAHO trueNAHO added the C-tracking-issue Category: A tracking issue label Mar 27, 2024
@trueNAHO trueNAHO changed the title [TRACKING ISSUE] mangohud: invalid font_file declaration mangohud: invalid font_file declaration Mar 27, 2024
@trueNAHO
Copy link
Collaborator Author

trueNAHO commented May 13, 2024

cc: @NovaViper

MangoHud appears really small on my monitor

image

-- #307 (comment)

Is this not caused by the

font_size = fonts.sizes.applications;
font_size_text = fonts.sizes.applications;

options rather than the removed font_file option 1?

In that case, considering MangoHud's special gaming use case, we could simply add a scaling factor option to the stylix.targets.mangohud option attribute set, or add a more reusable target option to the stylix.fonts.sizes option attribute set. I would prefer adding a stylix.fonts.sizes option.

@NovaViper
Copy link

NovaViper commented May 20, 2024

@trueNAHO Hey sorry for the delay! The small text seems to be caused by the font_size and font_size_text options, as even though the font_file option is gone, the it's still extremely small. 🤔 In fact i found that the default MangoHud settings has both of those options set to 24 rather than 10 (which is what the font.sizes.applications value is).

Edit: Can definitely confirm it is those two settings! I forced them both to be 24 and the GUI is large again!
When font_size and font_size_text are set to 10 (what stylix is using)
image

When font_size and font_size_text are set to 24
image

@danth
Copy link
Owner

danth commented May 20, 2024

What unit are font_size and font_size_text measured in?

The Stylix options are in points (1 point = 1⅓ pixels).

@RANKSHANK
Copy link
Contributor

What unit are font_size and font_size_text measured in?

The Stylix options are in points (1 point = 1⅓ pixels).

It uses ImGUI under the hood so it should be pixels. This line sets the font scaling accordingly with a factor of 1⅓

I took some screenshots and measured the glyph sizes, and it looks like both the size and scaling need to have the 1⅓ factor applied for the glyph size in pixels to be correct. Not sure why the pt->px scaling needs to be applied twice

It should also be noted that the sizing measurements also included the drop shadow to reach the correct glyph size, which is 1px thick at 10pt and 2px thick at 16pt. I'd almost want to bump the scaling up a touch so that the font size corresponds to the non decorative component of the text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue
Projects
None yet
Development

No branches or pull requests

4 participants