NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Display on 4k resolution is either blurry or very small


Joined: 14 Apr 2007
Posts: 96
Reply with quote
Hello,

Just wondering what settings others have tried to get PhpED to display correctly on a 4K monitor. I have the resolution set to 3840, which is native. If I check the box for "disable scaling on high DPI settings", all the text in the editor is micro-sized (very, very small). If I uncheck the box, everything in the editor is a normal size, but it is blurry. I have also tried using a resolution of 1920, but I get the same issue.

Is there some combination of settings that is optimal? Has this issue been addressed by a later build of PhpEd?

I'm on Windows 10, build 1819 of PhpEd.

**update**
After further research, I think what I am asking about is called HiDPI support. Has this been implemented in PHPEd?


Thanks!
View user's profileFind all posts by rodericksimpsonSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Seems you didn't make it right.
For GDI-based applications to have them scaled properly you need to change DPI.
Open Control Panel -> All Control Panel Items -> Display
On "Change site of items" you'll find "set a custom scaling level" link. Click on it and set scale accordingly on the "Custom scaling options" dialog. Most like you you'll need something between 200 or 400%. This is HiDPI and it is supported in v18.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 07 Jul 2020
Posts: 1
Reply with quote
What worked for me:
Right click on PhpED shortcut (or executable) and go
Compatibility -> Change high DPI settings -> Override high DPI scaling behaviour -> Application
View user's profileFind all posts by RoadRunnerSend private message
Veteran

Joined: 06 Mar 2007
Posts: 158
Location: Poland
Reply with quote
Can you add "Interface Font Size" to the options?
Even if all the above is tried, and many more, the font is still too small (it is taken from "MS Shell Dlg 2" at size 8? Quite too small.
Also, maybe it's worth to stop basing on "MS Shell Dlg 2" font for the next versions?

_________________
ML
View user's profileFind all posts by introSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Intro, I think you may want to read about role of MS Shell Dlg 2 in Windows.
https://docs.microsoft.com/en-us/windows/win32/intl/using-ms-shell-dlg-and-ms-shell-dlg-2
In short, no, PhpED does not use "MS Shell Dlg 2" at all. All the forms we have in the project have "Default" as a font name property. It's just Windows substitutes it to "MS Shell Dlg 2" for you.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 06 Mar 2007
Posts: 158
Location: Poland
Reply with quote
@dmitri - yes, yes, I'm aware of the role, sorry (it was shorts in my mind). However, while the substitute is easy to solve, but the size is the problem here. There is no way to change the size of the font in the substitute directly (that's why I just asked for the "Interface Font Size" - which would affect for all Tabs, headers, menu etc.). There is huge disproportion between Menu and all other texts. Image example: http://www.introne.com/uisizes.jpg

_________________
ML
View user's profileFind all posts by introSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Hmm, indeed, it's somewhat larger. What's the DPI or font scale factor you set? If you changed the default, did you do this for PhpED only or system-wide?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 06 Mar 2007
Posts: 158
Location: Poland
Reply with quote
@dmitri - thank you for the reply.

Quote:
What's the DPI or font scale factor you set?

I use the DPI at 140%. However, please note that for the PhpED I have disabled DPI scaling (seems that's why it's the issue).
Of course I can not chnage PhpED to repsect DPI scaling due to the epic blur on the whole UI - which is simply an eyeskiller and... no words.

However, the above screenshot is made after some custom modyfications to the substitutes (with a little bit font re-edited in the font forge), and due to disabled DPI scaling for the PhpED the custom changes in the system do not much and are still not enough (tiny fonts epic issue).

The disproportion between the text size of the menu and all the large list headers and tiny explorer items - it all is making eyes very tired very quickly.

As long as menu font size respects the size of the "Menu" item from the windows metrics, then all the text in the Tabs has the system default size only (it is size=8 iirc?). Also it is shame that the font family is not taken from "Menu" metrics as well (but this one noticing just by the way).

Quote:
did you do this for PhpED

So that is the exact issue that I can not change anything to the PhpED. These are only system wide changes. So what my request was is just to have "Interface font size" which will respect the custom value once for all the fonts in the PhpED (Menu, all the texts in the tabs, headers, log output etc. etc.). It could be called "Font UI scaling" or whatever to gain the "modern" name.

_________________
ML
View user's profileFind all posts by introSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Interesting. I just checked 140% scale and I have to say that in my case font size in the toolbar and menus is very consistent with what I see in the OS popup menus
In your case font is very different. Looks like a customization has been made. Regarding difference in font size between toolbar and the rest of the form, it's hard to say for sure why it happened. May be system is reporting DPI other than 134? (1.4 * 96)

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 06 Mar 2007
Posts: 158
Location: Poland
Reply with quote
@dmitri - thank you for the reply. Please note that as long as it all works well at 100% for you, then simply if you set DPI to 140% it will not show you the issue obviously - you'll see just everything bigger and possibly... bluryyyryyyy, and so on. Try to use PhpED on 1920x1080 at 13 inch. Impossible to read it. Menu modyfication is ok, but all the Tabs has way too tiny fonts, not readable, unfortunately, but big headers. I don't want to allow the PhpED to be scaled by the OS, because it's one huge blur devil, impossible to work with at all.

It is not as deep customization as it looks like. It is only the two following customizations which affects the PhpED:
- MS Shell Dlg 2 => PT Serif Caption
- the fonts for Windows Metrics => PT Serif Caption at size 10
Nothing more at this point is customized.

I think the issue here is that the MS Shell Dlg 2 substitue uses size 8, whatever font is set, but this size even can not be changed in the OS. So it is that the PhpED is using size 8 for all the Tabs, and the menu takes the size from the "Menu" item in the Windows Metrics - that's why I can get the size difference between the Tabs and the Menu (which is not exactly the issue), and that's why my request is just to have possibility to change the font size for all the Tabs/UI (that's the issue) - to make them just bigggerrrr (well, of course except editor, the editor has own rules). It is nothing more and nothing less I'm asking for. Smile

Another example when I set up the "Verdana" font (it's yet worse): http://www.introne.com/phpedverdana.jpg

Quote:
may be system is reporting DPI other than 134?

Yes, like I said, please keep in mind that DPI is disabled for PhpED, as the above said.

Check the Visual Studio as an example (everything is consistent and well readable): http://www.introne.com/vsexample.jpg
At there you may set up just single font at specified size for the whole UI.

I think that maybe the closer to see the issue is to open my images at zoom about 71%.

_________________
ML
View user's profileFind all posts by introSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I think it makes sense to set scale ratio close to ratio produced by two small integers, the smaller integers the better. 140% is particularly bad choice because it's 7/5. Can you try 125 or 150? they should look better -- 5/4 and 3/2 respectively.
Also you can play with Clear Type feature adjustments and h/w options for HDMI input sharpness. I myself had very bad experience working with Windows 10 running on my Dell 13" 4K notebook connected to two 27" Dell monitors. It worked very bad. Same Dell displays are still working fine with Windows 7 and Mac OS, connected through the same ports and USB-C adapters.
As of MS, I know they're using some other library and UI engine. Unfortunately, it's not an option for PhpED project, at least not without huge re-writing from scratches. We can move forward and switch to newer version of the library we're using for UI, it supports variable DPI, but corresponding IDE is not working good and it's not compatible with Windows 7 at all. Probably the library has many bugs too. What I'm trying to say -- there is no easy way.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 06 Mar 2007
Posts: 158
Location: Poland
Reply with quote
@dmitri - thank you for the reply.

Quote:
I think it makes sense to set scale ratio close to ratio produced by two small integers


Could you please explain in what way it could help at all? I don't see the relation here. I did mention I have disabled scaling for the PhpED, othrewise it would be if you take a screenshot of PhpED and upscale it, so whatever you would choose, 125%, 140% or 150%, it will always be bad and blur.

As long as 140% scaling makes the fonts bigger in general (and the 140% is the max value where the system looks enough good, incl. cursor, lol), but somehow only in the PhpED it's still much smaller than expected. For example check the following screen: http://introne.com/msdlgcomp.jpg

The window at the right also uses the "MS Shell Dlg 2" substiute, but as you can see, the size of the font is bigger. Why?


Quote:
Also you can play with Clear Type

Despite since I member I turn the being called "Celartype" off, yes, I tried it, and it's yet worse (but anyway it has nothing to do with the font size at all).

Quote:
I know they're using some other library and UI engine

I understand that rewrite to the other engine is more like making the interface from scratch, so that's not the point at all. However there is some magic word: "WM_SETFONT"...

Anyway, simply saying, only the font size for PhpED change is the option, all other suggestions is only walking after the solution more or less bad, but very bad in general, and so on.

_________________
ML
View user's profileFind all posts by introSend private messageVisit poster's website
Display on 4k resolution is either blurry or very small
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 2  

  
  
 Reply to topic