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

Method readHeader

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

Source from the content-addressed store, hash-verified

992
993
994 protected void readHeader(DataInputStream is) throws IOException {
995 value = is.readInt();
996 height = is.readInt();
997 width = is.readInt();
998 setWidth = is.readInt();
999 topExtent = is.readInt();
1000 leftExtent = is.readInt();
1001
1002 // pointer from a struct in the c version, ignored
1003 is.readInt();
1004
1005 // the values for getAscent() and getDescent() from FontMetrics
1006 // seem to be way too large.. perhaps they're the max?
1007 // as such, use a more traditional marker for ascent/descent
1008 if (value == 'd') {
1009 if (ascent == 0) ascent = topExtent;
1010 }
1011 if (value == 'p') {
1012 if (descent == 0) descent = -topExtent + height;
1013 }
1014 }
1015
1016
1017 protected void writeHeader(DataOutputStream os) throws IOException {

Callers 1

GlyphMethod · 0.95

Calls 1

readIntMethod · 0.80

Tested by

no test coverage detected