From: gmungoc Date: Thu, 2 May 2019 13:37:13 +0000 (+0100) Subject: JAL-3239 draw EPS or SVG one character at a time (even monospaced) X-Git-Tag: Release_2_11_0~15^2~3^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fbug%2FJAL-3239monospacedEps;p=jalview.git JAL-3239 draw EPS or SVG one character at a time (even monospaced) --- 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()) {