Bug 90103 - Font sizing is wrong when sharing diagrams
Summary: Font sizing is wrong when sharing diagrams
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-23 16:24 UTC by Bill Lewis
Modified: 2018-02-22 08:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.20.80 (KDE Applications 16.11.80)


Attachments
design (17.78 KB, text/x-xmi)
2016-01-25 21:28 UTC, Ralf Habacker
Details
design (update) (21.00 KB, application/xml)
2016-10-24 07:57 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Lewis 2004-09-23 16:24:42 UTC
Version:           1.3.0 (using KDE KDE 3.3.0)
Compiler:          gcc (GCC) 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6) 
OS:                Linux

When sharing umbrello design files between developers, the size of the activity bubbles is inconsistent (smaller than that originally made by a developer) and the text is cut on the left and the right.  Opening the properties dialog and clicking OK will force a redraw with the correct size and spacing to view the text, however, all the transition lines and spacing needs to then be redone.

If the diagram is reopened in the same workstation, then sizing is fine.  The problem seems to persist when opening the file on a different workstation than the one originally creating the diagram.  Have only noticed this in Activity diagrams thus far and cannot seem to reproduce at will, however, it does happen about 80% of the time.

All workstations are running the same version of KDE and Umbrello.
Comment 1 Bill Lewis 2004-09-23 17:06:04 UTC
OK, so this was just confirmed to be the case with use case diagrams as well.
Comment 2 Jonathan Riddell 2004-09-25 01:35:05 UTC
This is due to differences in fonts and resolutions between machines I think.
Comment 3 Bill Lewis 2004-10-14 20:46:35 UTC
Machines are all built from the same source tree using Gentoo emerge (this includes X and KDE).  Additionally, two of the machines are the same exact hardware with the exception of monitors...
Comment 4 Oliver Kellogg 2005-10-15 16:27:27 UTC
Does this also happen when using 1.4 or newer?
Comment 5 Peter Soetens 2005-10-16 12:45:44 UTC
This bug is/may be caused by the fact that font sizes are stored in the xmi file as 'dpi' values and lines are stored as 'pixel' values. A change of resolution leads to inconsistent scaling since the pixel values end up at different places due to pixels/inch changes. The only solution is to store the resolution at which a drawing was made and convert stored pixel values from old to new resolution. To improve printing quality, we could store any file at a 'virtual' resolution of 600 dpi while diplays will show only 100 or 75 dpi and printers at 300 or 600.
Some 'wrapper' function is required which converts pixels correctly on save/load. Seems to be do-able.
Comment 6 Iztok Kobal 2010-03-01 15:22:22 UTC
I am using:

Version 2.3.1
Using KDE 4.3.1 (KDE 4.3.1) "release 6"
platform: x86_64, OpenSUSE 11.2

and the issue is still here and annoying.

Is any activity on this matter planned in near or less near future ?
Comment 7 Ralf Habacker 2015-06-17 06:59:59 UTC
There has been bugs fixed with related font/graphics resolution issues, see BUG 349234, BUG 348848
Comment 8 Ralf Habacker 2016-01-25 21:28:13 UTC
Created attachment 96841 [details]
design
Comment 9 Ralf Habacker 2016-10-24 07:57:29 UTC
Created attachment 101734 [details]
design (update)
Comment 10 Ralf Habacker 2016-10-24 11:25:30 UTC
Git commit 3409db0b671a61440cb7e89dd024adf961b21cee by Ralf Habacker.
Committed on 24/10/2016 at 11:23.
Pushed by habacker into branch 'master'.

Fix 'Font sizing is wrong when sharing diagrams'.

For any new file the current screen resolution is written into the xmi
file. If a file contains resolution the file coordinates are recalculated
into current screen resolution on load and recalculated to file resolution
on save.

Files without coordinates resolution are not recalculated on load or save,
because it is currently not known how to estimate the resolution the file
is created with. Adjusting those files requires currently adding the
"resolution" attribute to the <diagrams> tag manually.

To solve that issue an option would be to add a user request to get the
correct resolution or to print out a user warning on the status line after
loading and to add an option to be able to change the resolution in
document settings or if possible to estimate it from any diagram
coordinates.
FIXED-IN:2.20.80 (KDE Applications 16.11.80)

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>

M  +1    -0    CMakeLists.txt
M  +2    -1    doc/xml/umbrello-diagrams.dtd
M  +1    -1    models/UmbrelloArchitecture/umlmodel.xmi
M  +52   -2    umbrello/umldoc.cpp
M  +10   -0    umbrello/umldoc.h
M  +21   -3    umbrello/umlmodel/folder.cpp
M  +1    -1    umbrello/umlmodel/folder.h
M  +13   -5    umbrello/umlwidgets/associationline.cpp
M  +12   -7    umbrello/umlwidgets/umlwidget.cpp
M  +1    -1    umbrello/version.h

http://commits.kde.org/umbrello/3409db0b671a61440cb7e89dd024adf961b21cee
Comment 11 Ralf Habacker 2018-02-22 08:40:03 UTC
Git commit 8cbeef8ba53b5ef1274bc6d882d680df6b006750 by Ralf Habacker.
Committed on 21/02/2018 at 21:24.
Pushed by habacker into branch 'master'.

Do not apply dpi scale twice on loading and saving of an association line

Also print information on setting resolution from file for easier
debugging.

M  +1    -0    umbrello/umldoc.cpp
M  +2    -2    umbrello/umlwidgets/associationline.cpp

https://commits.kde.org/umbrello/8cbeef8ba53b5ef1274bc6d882d680df6b006750