MCPcopy Index your code
hub / github.com/benfry/processing4 / index

Method index

core/src/processing/core/PFont.java:619–638  ·  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

617 * @return index into arrays or -1 if not found
618 */
619 protected int index(char c) {
620 if (lazy) {
621 int index = indexActual(c);
622 if (index != -1) {
623 return index;
624 }
625 if (font != null && font.canDisplay(c)) {
626 // create the glyph
627 addGlyph(c);
628 // now where did i put that?
629 return indexActual(c);
630
631 } else {
632 return -1;
633 }
634
635 } else {
636 return indexActual(c);
637 }
638 }
639
640
641 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