Font / image proportions wrong on Windows 8 / Dell XPS15

Please use this forum to signal bugs.
Merci d'utiliser ce forum pour signaler des bugs.

Font / image proportions wrong on Windows 8 / Dell XPS15

Postby thomas.beale » Tue 14 Oct 2014 16:25

I opened a project previously developed on a Dell Latitude / Win 7 machine, where all graphics proportions and fonts were normal. I open the project on a new machine (Win 8.1 / DELL XPS15) and the drawing has been shrunk, but the original fonts preserved, giving the effect visible in the attachment.

Even if I open the project on the second monitor (used to be attached to the Dell lattitude) I get the same effect.

I suspect BOUML is using the native pixel size of the screens to calculate some scaling factor, but in fact Win8 (or the graphics drivers) do thes anyway, and correct show e.g. 9pt font even on the main screen (3200x1800) as if it were 9 pixels high on an old style screen i.e. 1400x900 or 1024x or whatever.

I can't find any manipulation of font dpi or fonts or other scaling that fixes this problem.

- thomas
Attachments
bouml_on_win8.png
bouml_on_win8.png (146.78 KiB) Viewed 14163 times
thomas.beale
 
Posts: 45
Joined: Wed 21 Mar 2012 20:37

Re: Font / image proportions wrong on Windows 8 / Dell XPS15

Postby Bruno Pagès » Tue 14 Oct 2014 17:25

This is very strange, I don't have Win8 to check.

I don't know the native pixel size of the screen(s), so I don't use it to do some scale.

I adapt the automatic element size like classes to the size of the text written inside, and the size of the strings is given by Qt. It is like QT gives me a wrong size for the strings.

Do you have this problem even you set the scale to 100%, and for all the font size (set through the global menu miscellaneous) ?
Is it only for 'old' diagrams or this also occurs when you create a new diagram ?

Bruno
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 470
Joined: Mon 20 Feb 2012 08:23
Location: France

Re: Font / image proportions wrong on Windows 8 / Dell XPS15

Postby thomas.beale » Tue 14 Oct 2014 19:13

I just created a test project from scratch, new class diag, new class etc. It still happens. BOUML is running on the main laptop screen, which is 3200x1800 (like a Mac). In the attached screenshot, the red arrows point to things which seems to be scaled wrongly - the class box (which I named "TEST") and the drawing widgets. But the left hand explorer and main menu fonts are all ok. In fact, the font of the class is probably right; it's the graphic size that is wrong.

As far as I know, either Windows, or else the Nvidia (or maybe inbuilt Intel) graphics drivers know to scale applications so that they look normal, even though on a screen like this, pixels have about 3x linear density as an old style screen. My second screen is much larger, and has the 'old' density, but most apps just resize normally when you move them across from one screen to the other - including BOUML. But, the graphics scaling problem remains.

- thomas
Attachments
bouml_on_win8-2.png
bouml_on_win8-2.png (63.41 KiB) Viewed 14159 times
thomas.beale
 
Posts: 45
Joined: Wed 21 Mar 2012 20:37

Re: Font / image proportions wrong on Windows 8 / Dell XPS15

Postby thomas.beale » Tue 14 Oct 2014 19:15

BTW, that last screenshot is taken on the main screen, and the Windows 'Snip' tool just does a literal pixel capture. So when it is displayed on a normal screen, it looks giant! The real appearance is of course completely normal (i.e. fits on about 50% of a 15 inch screen.
thomas.beale
 
Posts: 45
Joined: Wed 21 Mar 2012 20:37

Re: Font / image proportions wrong on Windows 8 / Dell XPS15

Postby Bruno Pagès » Tue 14 Oct 2014 21:32

To know the size of a text for a given font I use QFontMetrics which is the class dedicated for that, unfortunately QFontMetrics(font) has a bug on Windows 8 (see https://bitbucket.org/tortoisehg/thg/commits/ec24f9d9de1c )

I created a patched version of the viewer, please can you get http://www.bouml.fr/files/boumlViewerTest.exe and load your project with it to check if this solves the drawing of the classes in a class diagram (I only changed the management for the classes in the class diagrams). If this works please can you check if this affect the productions of the PNG/SVG picture of a class diagram, and also the printing of a class diagram.

Bruno
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 470
Joined: Mon 20 Feb 2012 08:23
Location: France

Re: Font / image proportions wrong on Windows 8 / Dell XPS15

Postby thomas.beale » Wed 15 Oct 2014 14:09

I tested the viewer, it fixes the font problem but not the problem with overall scaling of the class box positioning, maybe it's to do with getting the idea of the A4 pane wrong? Anyway, see attached result - this is just the first thing I see when I open the project, no changes by me at all.

- thomas
Attachments
bouml_on_win8-3.png
bouml_on_win8-3.png (208.53 KiB) Viewed 14151 times
thomas.beale
 
Posts: 45
Joined: Wed 21 Mar 2012 20:37

Re: Font / image proportions wrong on Windows 8 / Dell XPS15

Postby Bruno Pagès » Wed 15 Oct 2014 17:40

The font is very strange, the width of an uppercase character is almost the double of a standard character

What font size you specified throw the global menu "miscellaneous" entry "font size" ?

DId you change the DPI configuration on your PC ?
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 470
Joined: Mon 20 Feb 2012 08:23
Location: France

Re: Font / image proportions wrong on Windows 8 / Dell XPS15

Postby thomas.beale » Thu 16 Oct 2014 08:39

The font size is 11 (it started at 8, I changed it to make it readable). No other changes to anything like DPI on the PC. Everything else works normally, including across the 2 screens.
thomas.beale
 
Posts: 45
Joined: Wed 21 Mar 2012 20:37

Re: Font / image proportions wrong on Windows 8 / Dell XPS15

Postby Bruno Pagès » Thu 16 Oct 2014 15:52

So for me everything works with the change I did for classes in class diagrams (to be reported everywhere), I explain :

The size in pixels of a diagrams depends on its format (default is "A4") :
    iso A5 : 592 x 840
    iso A4 : 840 x 1188
    iso A3 : 1188 x 1680
    iso A2 : 1680 x 2376
    iso A1 : 2376 x 3364
    iso A0 : 3364 x 4756
    USA A : 864 x 1116
    USA B : 1116 x 1728
    USA C : 1728 x 2236
    USA D : 2236 x 3456
    USA E : 3456 x 4472
    USA Letter : 864 x 1116
    USA Legal : 864 x 1424
    USA Tabloid : 1116 x 1728

And you have the landscape version for each. I fixed A0 size long time ago being the limit supported by graphic cards at this date, and I think it is enough large.

After that the size of an element like a class depends on what is written inside, and of course the size of a text depends on the used font and its size. The more you choose a large font the more for instance a class takes place in a diagram. This is enforced in your case by the fact the bold characters are incredibly large.

Under Bouml I use the default system font while it has codec, else I force the family "Helvetica".

I don't know what is the default font used by Qt on your system, I just know it has crazy bold character and it is very different than the font used under all other systems and releases of them I know, and worst you set a large font size with 11 pixels (whatever the real size of a pixel on your screen).

Except the change to bypass QFontMetrics problem under Windows 8 I will make everywhere, the only thing I can do is to recommend you to use larger format than A0, and to use a smaller font size.

If you set the size 11 of the font to be able to read non bold characters and the problems comes because of bold characters I can modify Bouml to allow the user to choose the font family, do you think this is useful ?

Bruno
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 470
Joined: Mon 20 Feb 2012 08:23
Location: France

Re: Font / image proportions wrong on Windows 8 / Dell XPS15

Postby thomas.beale » Thu 16 Oct 2014 16:49

I don't really need any special font, I don't think it's useful. Helvetica / Ariel are fine. In the test version of the viewer you provided the fonts in the class boxes are ok.

The relative locations of the class boxes are not correct, but I can fix that just by moving things around... except, for one thing. No matter what diagram size I choose, A0, A1, ... A4, Landscape etc, nothing happens - I cannot get the diagram border to be modified.

Also note that the class diagram palette widgets (the relationships, etc at the top of the frame) are much too small, even in the test viewer version. I can live with this, since they are still (just) comprehensible, but it probably needs to be fixed.

However, I can't see now how to fix the diagram size.

Messing around in the main BOUML executable (where the fonts really are broken), doing an 'automatic layout' produced something sensible.

I think if you do the font fix in the main BOUML exe, it will at least be usable compared to now - I can experiment more with that, if you can produce one.
thomas.beale
 
Posts: 45
Joined: Wed 21 Mar 2012 20:37

Next

Return to Bug reports / Rapports de bugs

Who is online

Users browsing this forum: No registered users and 0 guests