achuanle / umlet

Automatically exported from code.google.com/p/umlet
0 stars 0 forks source link

Underlined text: inconsistent distance between line and text #223

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm not sure that this appears everywhere, but in a sequence diagram instance 
box this happens:

a) One line of underlined text: space between text and line
b) as a), but valign=center: no space between text and line

c) Two lines of underlined text: one line with space, one line without
d) as c), but valign=center: the same, but space swapped between lines

(zoom 100%, font size 12 or 14 give the same result, as do serif/sans serif 
fonts)

Missing space between text and line impairs readability.

What is the expected output? What do you see instead?
Expected: space between line and text, consistently
Instead: sometimes space, som times not

What version of the product are you using? On what operating system?
13.1, Fedora 20 x86-64, (Lenovo R500, 1680x1050)

Please provide any additional information below.

Original issue reported on code.google.com by fropet...@gmail.com on 18 Jan 2015 at 7:20

GoogleCodeExporter commented 9 years ago
Added a file to illustrate

Original comment by fropet...@gmail.com on 6 Feb 2015 at 8:30

Attachments:

GoogleCodeExporter commented 9 years ago
I tried to reproduce it on Windows7 but it works as expected (see attachments)

do you see the same error if you open the uxf file?

also please post your exact java version (java --version) because it seems like 
a 0.5px displacement issue which I have seen some time ago depending on the 
java version I think

Original comment by AFDiaX on 6 Feb 2015 at 9:07

Attachments:

GoogleCodeExporter commented 9 years ago
Yes. (see attachment)

Do you have a hint on how to locate the cause?

Any other Linux users out there who could test this?

Original comment by fropet...@gmail.com on 6 Feb 2015 at 9:15

Attachments:

GoogleCodeExporter commented 9 years ago

$ java -version
java version "1.7.0_75"
OpenJDK Runtime Environment (fedora-2.5.4.2.fc20-x86_64 u75-b13)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)

Original comment by fropet...@gmail.com on 6 Feb 2015 at 9:21

GoogleCodeExporter commented 9 years ago
As UMLet uses java.awt.font.TextLayout (see 
http://www.java2s.com/Tutorial/Java/0261__2D-Graphics/TextAttributeUNDERLINESetu
nderlineforAttributedString.htm) to create underlined texts, there is not way 
to influence the exact distance between text and line

I have tried it on a Linux installation and there I can reproduce the issue.
Perhaps Java8 has fixed it?

Original comment by AFDiaX on 6 Feb 2015 at 9:37

GoogleCodeExporter commented 9 years ago
I installed java 1.8, but the result is the same.

$ java -version
openjdk version "1.8.0_31"
OpenJDK Runtime Environment (build 1.8.0_31-b13)
OpenJDK 64-Bit Server VM (build 25.31-b07, mixed mode)

Original comment by fropet...@gmail.com on 6 Feb 2015 at 10:05

Attachments:

GoogleCodeExporter commented 9 years ago
Oracle JDK gives the same result

$ java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

Original comment by fropet...@gmail.com on 6 Feb 2015 at 11:35

Attachments: