MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / getFonts

Method getFonts

ij/src/main/java/ij/plugin/Text.java:74–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72 }
73
74 String[] getFonts() {
75 GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
76 String[] fonts = ge.getAvailableFontFamilyNames();
77 ArrayList names = new ArrayList();
78 names.add("SansSerif");
79 names.add("Serif");
80 names.add("Monospaced");
81 for (int i=0; i<fonts.length; i++) {
82 String f = fonts[i];
83 if (f.length()<=20 && !(f.equals("SansSerif")||f.equals("Serif")||f.equals("Monospaced")))
84 names.add(f);
85 }
86 return (String[])names.toArray(new String[names.size()]);
87 }
88
89 public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) {
90 ImagePlus imp = WindowManager.getCurrentImage();

Callers 1

showDialogMethod · 0.95

Calls 5

addMethod · 0.65
lengthMethod · 0.65
equalsMethod · 0.45
toArrayMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected