File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -292,11 +292,14 @@ String getIpAddrFromStr(String strWithIP) {
292292 }
293293}
294294
295- float getFontStringHeight (PFont _font , String string ) {
295+ float getFontStringHeight (PFont font , String text ) {
296+ if (text == null ) {
297+ return 0 ;
298+ }
296299 float minY = Float . MAX_VALUE ;
297300 float maxY = Float . NEGATIVE_INFINITY ;
298- for (Character c : string . toCharArray()) {
299- PShape character = _font . getShape(c); // create character vector
301+ for (Character c : text . toCharArray()) {
302+ PShape character = font . getShape(c); // create character vector
300303 for (int i = 0 ; i < character. getVertexCount(); i++ ) {
301304 minY = min (character. getVertex(i). y, minY);
302305 maxY = max (character. getVertex(i). y, maxY);
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ class Grid {
4242 pushStyle ();
4343 textAlign (LEFT );
4444 stroke (OPENBCI_DARKBLUE );
45- textFont (p5, 12 );
45+ textFont (tableFont, tableFontSize );
4646
4747 if (drawTableInnerLines) {
4848 // draw row lines
You can’t perform that action at this time.
0 commit comments