From 93fa1f2cb39ea3ffcf142ab35a77917e2b3d1bbf Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 2 May 2019 14:37:13 +0100 Subject: [PATCH] JAL-3239 draw EPS or SVG one character at a time (even monospaced) --- src/jalview/gui/SequenceRenderer.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/SequenceRenderer.java b/src/jalview/gui/SequenceRenderer.java index 81b394b..39c1ba7 100755 --- a/src/jalview/gui/SequenceRenderer.java +++ b/src/jalview/gui/SequenceRenderer.java @@ -30,6 +30,9 @@ import java.awt.Color; import java.awt.FontMetrics; import java.awt.Graphics; +import org.jfree.graphics2d.svg.SVGGraphics2D; +import org.jibble.epsgraphics.EpsGraphics2D; + public class SequenceRenderer implements jalview.api.SequenceRenderer { final static int CHAR_TO_UPPER = 'A' - 'a'; @@ -254,8 +257,14 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer } graphics.setColor(av.getTextColour()); - if (monospacedFont && av.getShowText() && allGroups.length == 0 - && !av.getColourText() && av.getThresholdTextColour() == 0) + boolean drawAllText = monospacedFont && av.getShowText() && allGroups.length == 0 + && !av.getColourText() && av.getThresholdTextColour() == 0; + if (graphics instanceof EpsGraphics2D + || graphics instanceof SVGGraphics2D) + { + drawAllText = false; + } + if (drawAllText) { if (av.isRenderGaps()) { -- 1.7.10.2