File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 2626package processing .core ;
2727
2828import java .awt .Color ;
29+ import java .awt .Font ;
2930import java .awt .Image ;
31+ import java .awt .Toolkit ;
32+ import java .awt .font .FontRenderContext ;
3033import java .util .HashMap ;
3134import java .util .WeakHashMap ;
3235
@@ -4797,6 +4800,15 @@ protected void textCharScreenImpl(PImage glyph,
47974800 }
47984801
47994802
4803+ /**
4804+ * Convenience method to jump through some Java2D hoops and get an FRC.
4805+ */
4806+ @ SuppressWarnings ("deprecation" )
4807+ public FontRenderContext getFontRenderContext (Font font ) {
4808+ return Toolkit .getDefaultToolkit ().getFontMetrics (font ).getFontRenderContext ();
4809+ }
4810+
4811+
48004812
48014813 //////////////////////////////////////////////////////////////
48024814
You can’t perform that action at this time.
0 commit comments