MCPcopy Index your code
hub / github.com/processing/processing / loadFonts

Method loadFonts

core/src/processing/core/PFont.java:911–926  ·  view source on GitHub ↗

Make an internal list of all installed fonts. This can take a while with a lot of fonts installed, but running it on a separate thread may not help much. As of the commit that's adding this note, loadFonts() will only be called by PFont.list() and when loading a font by name, both of which are occa

()

Source from the content-addressed store, hash-verified

909 * https://bugs.openjdk.java.net/browse/JDK-8179209
910 */
911 static public void loadFonts() {
912 if (fonts == null) {
913 GraphicsEnvironment ge =
914 GraphicsEnvironment.getLocalGraphicsEnvironment();
915 fonts = ge.getAllFonts();
916
917 if (PApplet.platform == PConstants.MACOSX) {
918 fontDifferent = new HashMap<>();
919 for (Font font : fonts) {
920 // No need to use getPSName() anymore because getName()
921 // returns the PostScript name on OS X 10.6 w/ Java 6.
922 fontDifferent.put(font.getName(), font);
923 }
924 }
925 }
926 }
927
928
929 /**

Callers 2

listMethod · 0.95
findFontMethod · 0.95

Calls 2

putMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected