import jalview.analysis.Rna;
import jalview.analysis.StructureFrequency;
import jalview.api.AlignViewportI;
+import jalview.bin.Jalview;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.Annotation;
import jalview.datamodel.ColumnSelection;
// scale only if the current font isn't already small enough
fmScaling = charWidth;
fmScaling /= fmWidth;
- gg.setFont(ofont);
- gg.transform(
- AffineTransform.getScaleInstance(fmScaling, 1.0));
+ if (Jalview.isJS())
+ {
+ gg.setFont(ofont);
+ gg.transform(AffineTransform.getScaleInstance(fmScaling,
+ 1.0));
+ }
+ else
+ {
+ g.setFont(ofont.deriveFont(AffineTransform
+ .getScaleInstance(fmScaling, 1.0)));
+ }
// and update the label's width to reflect the scaling.
fmWidth = charWidth;
}