Open trueNAHO opened 8 months ago
cc: @NovaViper
MangoHud appears really small on my monitor
-- https://github.com/danth/stylix/pull/307#issuecomment-2024349791
Is this not caused by the
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.
@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)
When font_size
and font_size_text
are set to 24
What unit are font_size
and font_size_text
measured in?
The Stylix options are in points (1 point = 1â…“ pixels).
What unit are
font_size
andfont_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.
About
This tracking issue manages the
font_file
hotfix, resolving:Steps
mangohud: declare 'font_file'