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

Method width

core/src/processing/core/PFont.java:697–704  ·  view source on GitHub ↗

Width of this character for a font of size 1.

(char c)

Source from the content-addressed store, hash-verified

695 * Width of this character for a font of size 1.
696 */
697 public float width(char c) {
698 if (c == 32) return width('i');
699
700 int cc = index(c);
701 if (cc == -1) return 0;
702
703 return ((float) glyphs[cc].setWidth / (float) size);
704 }
705
706
707 //////////////////////////////////////////////////////////////

Callers 1

textWidthImplMethod · 0.80

Calls 1

indexMethod · 0.95

Tested by

no test coverage detected