added option to scale tooltip rendering#151
Conversation
majcosta
left a comment
There was a problem hiding this comment.
Please, next time try to separate the meaty changes, whitespace changes (not the newline additions, that's the .editorconfig file's doing, not you) and dead code removal into their own commits, it makes reviewing the PR much easier.
If the actual code changes can themselves be split up into smaller logical commits, even better.
I tested English and German and it works fine, but Chinese tooltips are broken with TOOLTIP_SCALE_FACTOR > 100
I'm only formatting the parts of the code that I'm touching and in the case of changing most of the function code, I might format the full function.
I didn't try it out with the Chinese build. I hope that changing the build target will suffice to be able to test it on my side. |
You'll need a Chinese gamedir as well. It's the same process as running English 1.13, with the extra step of extracting |
majcosta
left a comment
There was a problem hiding this comment.
cool, Chinese works now. thanks!
the source pr 1dot13/source#151 made it possible to scale up tooltips added the setting and description to ja2.ini to allow to make use of it
Update to ja2.ini for scaling tooltips he source pr 1dot13/source#151 made it possible to scale up tooltips added the setting and description to ja2.ini to allow to make use of it
The old rendering is unchanged in function, despite the heavy refactoring.
Some existing tooltip rendering issues are fixed now, for example, the bold character is no longer considered when computing the tooltip width.
I removed
DEC_INTERNAL_LEADINGsince WinFont is not supposed to be used except for the Chinese build. It also fixes the font alignment if it is enabled for other builds.The fast help text is parsed multiple times. This resulted in some duplication of a good chunk of code. Doing this cleanly would mean to parse it when updating
FastHelpText. The parsing result would be a<list<list<WeightedText>>that would be saved besidesFastHelpText. This represents a list of lines. Each line would have parts of text that is continuously bold or regular font.WeightedTextwould be a struct withbool isBoldandSTR16 textproperties.Known Issue:
LOGFONTsettings. The issue itself is not large as we are speaking of 1-3 pixels misalignment.