MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / setFont

Method setFont

src/org/jibble/epsgraphics/EpsGraphics2D.java:904–913  ·  view source on GitHub ↗

Sets the Font to be used in future text.

(Font font)

Source from the content-addressed store, hash-verified

902 * Sets the Font to be used in future text.
903 */
904 @Override
905public void setFont(Font font) {
906 if(font==null) {
907 font = Font.decode(null);
908 }
909 _font = font;
910 if(!getAccurateTextMode()) {
911 append("/"+_font.getPSName()+" findfont "+(_font.getSize())+" scalefont setfont"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
912 }
913 }
914
915 /**
916 * Gets the font metrics of the current font.

Callers 3

EpsGraphics2DMethod · 0.95
setAccurateTextModeMethod · 0.95
setTransformMethod · 0.95

Calls 4

getAccurateTextModeMethod · 0.95
appendMethod · 0.95
getSizeMethod · 0.65
decodeMethod · 0.45

Tested by

no test coverage detected