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

Method FontGlyph

core/src/processing/core/PShapeSVG.java:1942–1963  ·  view source on GitHub ↗
(PShapeSVG parent, XML properties, Font font)

Source from the content-addressed store, hash-verified

1940 int horizAdvX;
1941
1942 public FontGlyph(PShapeSVG parent, XML properties, Font font) {
1943 super(parent, properties, true);
1944 super.parsePath(); // ??
1945
1946 name = properties.getString("glyph-name");
1947 String u = properties.getString("unicode");
1948 unicode = 0;
1949 if (u != null) {
1950 if (u.length() == 1) {
1951 unicode = u.charAt(0);
1952 //System.out.println("unicode for " + name + " is " + u);
1953 } else {
1954 System.err.println("unicode for " + name +
1955 " is more than one char: " + u);
1956 }
1957 }
1958 if (properties.hasAttribute("horiz-adv-x")) {
1959 horizAdvX = properties.getInt("horiz-adv-x");
1960 } else {
1961 horizAdvX = font.horizAdvX;
1962 }
1963 }
1964
1965
1966 protected boolean isLegit() { // TODO need a better way to handle this...

Callers

nothing calls this directly

Calls 5

parsePathMethod · 0.80
hasAttributeMethod · 0.80
getStringMethod · 0.65
getIntMethod · 0.65
printlnMethod · 0.45

Tested by

no test coverage detected