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

Method index

core/src/processing/core/PFont.java:612–631  ·  view source on GitHub ↗

Get index for the character. @return index into arrays or -1 if not found

(char c)

Source from the content-addressed store, hash-verified

610 * @return index into arrays or -1 if not found
611 */
612 protected int index(char c) {
613 if (lazy) {
614 int index = indexActual(c);
615 if (index != -1) {
616 return index;
617 }
618 if (font != null && font.canDisplay(c)) {
619 // create the glyph
620 addGlyph(c);
621 // now where did i put that?
622 return indexActual(c);
623
624 } else {
625 return -1;
626 }
627
628 } else {
629 return indexActual(c);
630 }
631 }
632
633
634 protected int indexActual(char c) {

Callers 3

getGlyphMethod · 0.95
widthMethod · 0.95
showFrameMethod · 0.45

Calls 2

indexActualMethod · 0.95
addGlyphMethod · 0.95

Tested by

no test coverage detected