On Thu Oct 19 15:56:32 2023 +0000, Santino Mazza wrote:
Mmm I'm stuck on this, how should I do it? The first I thing I thought was calling the callback for each string section with the specific font, but I realized that some functions like GdipMeasureString count the amount of times the callback is called for counting each line. I also thought in passing an array containing each section of the string, but that would require more refactoring and I'm not sure if that is desired.
If an array of runs is the cleanest way to do it in the end then I'd like to see the code refactored. If multiple callbacks is preferable then the assumption in GdipMeasureString should be changed (maybe pass in a variable indicating whether it's the first run in a line?).
Revising the callback signature to pass in a struct instead of so many arguments might also be a good idea.