archi
archi copied to clipboard
Underlined text disappears when zoomed out
Version of Archi
4.9.3
Archi Plug-ins
Collaboration
Operating System
Windows 10 Entreprise
Expected Behaviour
When zoomed out, name of elements should be displayed
Actual Behaviour
When zoomed out, name of elements when underlined is invisible. I've observed the same behaviour with all fonts I've tried.
Steps to Reproduce the Behaviour
- Create any element in a view, set a name
- Change Appearance > Font, check "underlined"
- Zoom out the view until the name of the element disappears
Sample model :
<?xml version="1.0" encoding="UTF-8"?>
<archimate:model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:archimate="http://www.archimatetool.com/archimate" name="Test" id="id-8d927c950c5549ffbf62fd5fd02065ce" version="4.9.0">
<folder name="Strategy" id="id-53dce5585f8240f09329e7edf3ff85b9" type="strategy"/>
<folder name="Business" id="id-c10d19fbe86d4ff984e61e3a62545f8e" type="business">
<element xsi:type="archimate:BusinessService" name="Business Service" id="id-eb8b083d49e84faca81a3617107dc4ea"/>
<element xsi:type="archimate:BusinessService" name="Business Service underlined" id="id-05046fd8616947c68e72f58885e066a2"/>
<element xsi:type="archimate:BusinessService" name="Business Service italic" id="id-592df81fa35a496a923321a9483506ae"/>
</folder>
<folder name="Application" id="id-02a7546b15bf4ab8a142a199255194ab" type="application"/>
<folder name="Technology & Physical" id="id-f6b4752963f64be195007281e6557360" type="technology"/>
<folder name="Motivation" id="id-c529251372494a71a378450d39109947" type="motivation"/>
<folder name="Implementation & Migration" id="id-ba443aa26fe7443399d2903889510a8e" type="implementation_migration"/>
<folder name="Other" id="id-3612765de63149c9a267d3b39f0e243c" type="other"/>
<folder name="Relations" id="id-bdf9a6951b8941ec854c51213bf85e61" type="relations"/>
<folder name="Views" id="id-5a003d69d1f64e3b8ce09f9a2d8f5de3" type="diagrams">
<element xsi:type="archimate:ArchimateDiagramModel" name="Default View" id="id-dae24b49cfd8466eb74dad0f212641c6">
<child xsi:type="archimate:DiagramObject" id="id-9e6c6115650e4802b16bef0162c1bcab" lineColor="#4f4f4f" fillColor="#fcea83" archimateElement="id-eb8b083d49e84faca81a3617107dc4ea">
<bounds x="-100" y="-120" width="121" height="51"/>
</child>
<child xsi:type="archimate:DiagramObject" id="id-0b3202a76d7e49eab3be6f78fc2492eb" font="1|Calibri|9.0|0|WINDOWS|1|-12|0|0|0|400|0|1|0|0|3|2|1|34|Calibri" lineColor="#4f4f4f" fillColor="#fcea83" archimateElement="id-05046fd8616947c68e72f58885e066a2">
<bounds x="-100" y="-45" width="121" height="51"/>
</child>
<child xsi:type="archimate:DiagramObject" id="id-7872d61889f840fba5efe7e3b66538a3" font="1|Calibri|9.0|2|WINDOWS|1|-12|0|0|0|400|-1|0|0|0|3|2|1|34|Calibri" lineColor="#4f4f4f" fillColor="#fcea83" archimateElement="id-592df81fa35a496a923321a9483506ae">
<bounds x="-100" y="30" width="121" height="51"/>
</child>
</element>
</folder>
</archimate:model>
Thanks for the report, which I can confirm (also with Strikeout)
It turns out that this is a side-effect of fixing problems with fonts not displaying properly when we stopped using the Draw2d class ScaledGraphics. See https://github.com/archimatetool/archi/issues/621
One of the things that the Draw2d class ScaledGraphics does is to handle scaling of fonts with with these text styles (but with certain problems which is why we no longer use it.)
Some observations:
- Underlined text is also not drawn when exporting to SVG (this has always been so)
- The Underline and Strikeout options in the font dialog do nothing on Mac and are not present on Linux (Mint) so this is Windows only
- The Modelio tool also encountered the same issue and doesn't use ScaledGraphics. See here. They have removed the additional font effects from the font dialog (Underline, Strikeout and Colour) probably for this exact reason.
So what can we do?
- Go back to using
ScaledGraphics, or - Remove the extra text style options from the font dialog as Modelio have done in their tool
- Leave things as they are and note that underline only renders at 100% zoom
Option (1) is not going to happen. I'd have to reverse months of work and we'd be back to having issues with clipped fonts. So perhaps option (2) would ensure consistency among platforms.
Regarding the ScaledGraphics class, it seems that it was regarded as needing to be removed or replaced some time ago:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=442442 https://bugs.eclipse.org/bugs/show_bug.cgi?id=470334
Remove the extra text style options from the font dialog
This is what I'll do for the next version. Pointless to have underline on only Windows and doesn't zoom.
I'll close this as can't be changed.