mumble
mumble copied to clipboard
Gap appears above each line of text
Description
1.4.287 addresses the text scaling issue but introduces a gap above each line of text
Relevant: https://github.com/mumble-voip/mumble/pull/5866
Steps to reproduce
- Look at the text pane
Mumble version
1.4.287
Mumble component
Client
OS
Windows
Reproducible?
Yes
Additional information
No response
Relevant log output
No response
Screenshots
Quoting from https://github.com/mumble-voip/mumble/pull/5820#issuecomment-1248150822
I suspect the problem is with setting font sizes on windows. Qt docs say anything > 0 is valid, but I'm thinking that the windows implementation is more picky.
Given that the function accepts a real number (instead of only integers) and Qt docs state
Note that if s is zero or negative, the behavior of this function is not defined.
I think we should first attempt to pass std::numeric_limits<qreal>::min()
- aka: the smallest possible value > 0 :thinking:
@Krzmbrzl This is in no way authoritative, but I'm not sure this will work. I assume that std::numeric_limits<qreal>::min()
is going to be less than the current argument, 0.01
. My intuition is that the windows implementation has a greater lower bound on the accepted values than what's documented by Qt. Consequently the call here fails which causes the "gap" to appear (since the newline doesn't get shrunk properly).
Unfortunately, I don't have a windows build environment set up right now so the above is just conjecture.
Ah okay. Then I misunderstood. I was under the impression that we're currently passing 0
into the function. As it stands, my suggestion is of course nonsense.
@Krzmbrzl just to be sure, is this already fixed by #5820 or another PR on master
? Otherwise I'd give it a shot (although I can only start working on it next Monday).
No this is not yet fixed. We had other issues with the chat log that we have addressed in the latest release, which created the regression that is tracked in this issue. So we'd happily take any attempt at fixing this :+1:
Short update: I'm having some trouble with the vcpkg
dependencies, apparently something about paths (e.g. ctype.h
not found), at least when I run scripts\vcpkg\get_mumble_dependencies.ps1
. I'll have to check tomorrow whether that still happens after a complete reinstall of the VS Build Tools and either file an issue here (or on vcpkg
) or continue with this issue :)
See also https://stackoverflow.com/q/42258311
@Krzmbrzl Thank you for the link, I hit exactly that problem. I think I found a solution that does not require the fontPointSize()
trick, I'll prepare a PR.