-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Add support for fractional font sizes. #87243
base: master
Are you sure you want to change the base?
Conversation
5a4d111
to
4472bb9
Compare
We can't change theme constants to floats, it breaks compatibility and hinders their usability as booleans. There is already a PR by @Calinou for that, but we haven't merged it for those reasons. If we are going to break compatibility, we need to implement it in a more useful way and extend constants to support a variety of types (but not necessarily the full spectrum of Variant types). But that's a lot of work and the API is not clear. |
4472bb9
to
f3beb5b
Compare
What exactly is it breaking? I do not see anything this can break.
This is definitely a useful thing to consider. |
I wanted to look up the aforementioned PR, and I did, #39013, but apparently there was some discussion elsewhere because it doesn't contain more examples. So I'll reiterate what I mentioned in chat for posterity: We don't have any control over what users may store in those properties and where they would get the values. So yes, if you control everything, you can assume it's going to be fine. But this creates a disconnect between how it works on the implementation side (either in engine or in user code) and how it's expected to work from the configuration side (mainly in user code). To match the expectations you have to change the code. I think it is compatibility breaking when you cannot be sure that a value that looks like a 0 (and is treated as And that's besides compatibility being broken in the literal way, which is why you add BC methods in this PR. That said, pardon my initially dry response. I do support the idea, and would love to have ints, floats, and proper bools as constants at the very least, maybe even more types. I would avoid going full Variant though, as we don't want to open Themes to be a storage utility for something which is not needed by them. At least not in arbitrary constants (otherwise people can start using them instead of better typed color and texture values, leading to a mess). |
6a5be8f
to
c550a76
Compare
c550a76
to
058d6a5
Compare
As my proposal here is strongly related to this PR, could / should glyph spacing and space glyph spacing also be included in this PR? |
Changes
font_size
andoutline_size
(theme constants) fromint
tofloat
for better font scaling control.