// set idCanvas bufferedImage to null
// to prevent drawing old image
FontMetrics fm = getFontMetrics(av.getFont());
+
+ // update the flag controlling whether the grid is too small to render the font
+ av.validCharWidth = fm.charWidth('M') <= av.getCharWidth();
scalePanelHolder.setPreferredSize(
new Dimension(10, av.getCharHeight() + fm.getDescent()));
import java.awt.Color;
import java.awt.Font;
+import java.awt.FontMetrics;
import java.awt.Rectangle;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
viewport.setIncrement(safeInt(view.getConsThreshold()));
viewport.setShowJVSuffix(safeBoolean(view.isShowFullId()));
viewport.setRightAlignIds(safeBoolean(view.isRightAlignIds()));
+ viewport.setFont(new Font(view.getFontName(),
+ safeInt(view.getFontStyle()), safeInt(view.getFontSize())),
+ (view.getCharWidth()!=null) ? false : true);
if (view.getCharWidth()!=null)
{
viewport.setCharWidth(view.getCharWidth());
viewport.setCharHeight(view.getCharHeight());
}
- viewport.setFont(new Font(view.getFontName(),
- safeInt(view.getFontStyle()), safeInt(view.getFontSize())),
- true);
ViewStyleI vs = viewport.getViewStyle();
vs.setScaleProteinAsCdna(view.isScaleProteinAsCdna());
viewport.setViewStyle(vs);