(PShapeSVG parent, XML properties, Font font)
| 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... |
nothing calls this directly
no test coverage detected