Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
RFC: DefaultWrite mode, CallTip, Completion popup fix
Commaster:
--- Quote from: Pecan on July 26, 2023, 09:27:06 pm ---
--- Quote from: Miguel Gimenez on July 24, 2023, 10:04:58 am ---These lines
--- Code: ---+ GETLB(wid)->SetFont(NewFont->Scaled(72.0/(72.0*scale))); //(ph 2023/07/18)
...
+ *pWidth = ((width*72*sysScaling)/72) + fp.size;
...
+ double dscale = (72.0 /(72.0 * sysScaleFactor)) +0.01;
--- End code ---
may be simplified, as 72.0 is in the numerator and the denominator. Why the 0.01?
--- End quote ---
I see how to simplify the "*pwidth" as (width*sysScaling) + fp.size;
but I do not see how to simplify (72.0 /(72.0 * sysScaleFactor))
With a scalling factor of 1.25:
72.0 * sysScalFactor is 90
72.0 / sysScalFactor is 57.6
72.0/(72.0*sysScalFactor) = .8 (the correct scaling factor)
Would you make a suggestion please.
--- End quote ---
it simplifies to 1.0/sysScalFactor, which is also .8 for scalling factor of 1.25
Pecan:
Attached is an updated version of the defaultWrite patch:
DefaultWritePatch_230729-2.patch
Changes:
1) Get the current windows scaling factor from the foreground window.
2) Lift the bottom text line off the bottom border.
3) Push the right border off the right most text character.
4) Some cleanup (as suggested) and more comments.
Question - should the patch wait until after the new CB is released or applied to the current HEAD?
@Ollydbg: would you run your test against this patch to see if it lifts the bottom line off the bottom border for the fonts you're using?.
I've tested (on Head) against Windows 10/11 and Linux. Am waiting for results from a Windows 7 test.
Thanks to all for reviews and testing.
Note: Comments starting with "//(ph" will be removed from the final patch.
Miguel Gimenez:
IMHO the patch should be applied before the release, or default technology should be Directwrite, or both.
ollydbg:
--- Quote from: Miguel Gimenez on July 29, 2023, 11:04:29 pm ---IMHO the patch should be applied before the release, or default technology should be Directwrite, or both.
--- End quote ---
The Direct Write(using the Direct2D) has other issues. It will crash if user unlocked the screen or recovered from hibernation.
ollydbg:
--- Quote from: Pecan on July 29, 2023, 09:33:14 pm ---Attached is an updated version of the defaultWrite patch:
DefaultWritePatch_230729-2.patch
--- End quote ---
Thanks for your great work!
--- Quote ---Question - should the patch wait until after the new CB is released or applied to the current HEAD?
--- End quote ---
I think it should be put in the trunk before the new C::B release.
--- Quote ---@Ollydbg: would you run your test against this patch to see if it lifts the bottom line off the bottom border for the fonts you're using?.
--- End quote ---
Yes, I can confirm it fixes the bottom border issue, thanks.
--- Quote ---I've tested (on Head) against Windows 10/11 and Linux. Am waiting for results from a Windows 7 test.
--- End quote ---
I have a Win7 OS, and I just test the new built C::B, the font works fine, I don't see C::B behave differently between Win7 and Win10.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version