JAL-3239 draw EPS or SVG one character at a time (even monospaced) bug/JAL-3239monospacedEps
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 2 May 2019 13:37:13 +0000 (14:37 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 2 May 2019 13:37:13 +0000 (14:37 +0100)
src/jalview/gui/SequenceRenderer.java

index 81b394b..39c1ba7 100755 (executable)
@@ -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())
       {