Closed mikisvandijk closed 3 years ago
Specialization and jArchi installed, probably not relevant
Quite the opposite. Please retry without the Specialization plugin (it hooks in the graphic engine and can introduce issues)
Does it happen in "export as image" using PNG format?
Any other info would help - your screen resolution (do you use hi-res screen?). Does the problem occur on a different machine? Does the problem occur using a different font? A different font size? Export to PNG? Export to SVG? Are you using label expressions? Etc...
Please try Archi 4.8.1 without the Specialization plug-in. If the issue persists, please attach an example *.archimate
file that demonstrates the problem.
Thanks fo your reactions. I've done some more elaborate testing:
The issue pertains to SVG and PDF export. Not to BMP and PNG Although I remember previous issues with HTML export as well, I couldn't repoduce them now.
(De)installing the specialization didn't have any impact
Upgrading from 4.8.0 to 4.8.1 greately reduces the issue (to an acceptible level) but doesn't solve it entirely
I couldn't reproduce the issue with Arial and Calabri, but I could with Arial Semi-narrow...
Additional info: I do use simple label expressions, but elements without any label-expression attached are also implicated. I use a 4K monitor; at the moment I have no opportunity to test on a different system.
Attachted screenprint demonstrates the difference before (right) and after (left) the upgrade to 4.8.1
If you still would like a .archimate example I can send my complete model (confidentially) by e-mail or I have to construct something. Let me know.
Thanks for the extra info.
Edit - no need to try these things as I can reproduce this. See my comment below.
Actually, it's interesting that you see such a difference between 4.8.0 and 4.8.1 as there were no changes made that might affect PDF export.
I'll be back, but probably not today...
I can get clipped text labels on Windows 10 if I set my display to 200% scaling (not an ideal scenario as all windows are double size) and using certain fonts and font sizes and a text string of "RT Pre-processing". It seems to happen more on words ending in "g". Also the same on Archi 4.6.0.
See attachment - clipped text.pdf
I don't think this is something that I can fix. The PDF/SVG export code is borrowed from some old Eclipse code from many years ago (com.archimatetool.export.svg.graphiti.GraphicsToGraphics2DAdaptor
) based on https://github.com/eclipse/gmf-runtime/blob/master/org.eclipse.gmf.runtime.draw2d.ui.render.awt/src/org/eclipse/gmf/runtime/draw2d/ui/render/awt/internal/graphics/GraphicsToGraphics2DAdaptor.java
and combined with the Draw2D
library we are seeing miscalculations of string widths when some fonts are used on hi-res devices. The same font and text might render OK on Mac, so it's also an OS thing.
I found something interesting in the original GraphicsToGraphics2DAdaptor.java
code:
They had a bug related to calculating font height. As an experiment I applied this line:
height = (int) fsize;
and my test case rendered OK on Windows at 200% scaling.
@mikisvandijk Could you test a special build of Archi?
I've uploaded it here:
https://www.archimatetool.com/downloads/beta/Archi-Win64-4.8.1-test.zip
It's the portable zip version of Archi for Windows and won't conflict with your current version of Archi. Just unzip it and run Archi.exe
If you could try creating a PDF with this version and report back that would be helpful.
Thanks! I will try it tomorrow...
Op di 23 mrt. 2021 19:16 schreef Phil Beauvoir @.***>:
@mikisvandijk https://github.com/mikisvandijk Could you test a special build of Archi?
I've uploaded it here - https;// www.archimatetool.com/downloads/beta/Archi-Win64-4.8.1-test.zip
It's the portable zip version of Archi for Windows and won't conflict with your current version of Archi. Just unzip it and run Archi.exe
If you could try creating a PDF with this version and report back that would be helpful.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/archimatetool/archi/issues/714#issuecomment-805123387, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR5FFKRE5E3CLMEPGAI3VCTTFDLHXANCNFSM4ZU2R6DA .
I've tried and I get interesting results that might help to narrow down the cause:
I hope it is fixable. If not, then at least we've found a work-around: change scaling factor before exporting.
@mikisvandijk Where are you setting the scaling of 100%, 150% and 200%? In Windows?
I hope it is fixable. If not, then at least we've found a work-around: change scaling factor before exporting.
The cause is a combination of device scaling, legacy Eclipse code and other factors. There is no real fix, unfortunately. The best we can do is to slightly reduce the size of the font by rounding down the float font size rather than rounding it up to the nearest integer.
The SVG and PDF image export is never going to be perfect. See here - https://bugs.eclipse.org/bugs/show_bug.cgi?id=312723
Yes, I set the scaling In Windows.
BTW I have a two-monitor setup.
My primary screen is the 4K monitor that I use at 150%, the secondary a Full-HD I use at 100%. I usually run my Archi on the 4K.
Version of Archi
Archi 4.8.0
Archi Plug-ins
Specialization and jArchi installed, probably not relevant
Operating System
Win 10
Expected Behaviour
Labels shown in Archi app are fully visible when exported to HTML or PDF Used font is Segoe 11
Actual Behaviour
Labels are cut off, last character is not or only partly visible
Steps to Reproduce the Behaviour
Export any view to PDF or HTML
See attachted screenprint and export
Radiotherapie.pdf