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

Method readHeader

core/src/processing/core/PFont.java:981–1001  ·  view source on GitHub ↗
(DataInputStream is)

Source from the content-addressed store, hash-verified

979
980
981 protected void readHeader(DataInputStream is) throws IOException {
982 value = is.readInt();
983 height = is.readInt();
984 width = is.readInt();
985 setWidth = is.readInt();
986 topExtent = is.readInt();
987 leftExtent = is.readInt();
988
989 // pointer from a struct in the c version, ignored
990 is.readInt();
991
992 // the values for getAscent() and getDescent() from FontMetrics
993 // seem to be way too large.. perhaps they're the max?
994 // as such, use a more traditional marker for ascent/descent
995 if (value == 'd') {
996 if (ascent == 0) ascent = topExtent;
997 }
998 if (value == 'p') {
999 if (descent == 0) descent = -topExtent + height;
1000 }
1001 }
1002
1003
1004 protected void writeHeader(DataOutputStream os) throws IOException {

Callers 1

GlyphMethod · 0.95

Calls 1

readIntMethod · 0.80

Tested by

no test coverage detected