Method
drawChar
(PGraphics g, char c, float x, float y, float size)
Source from the content-addressed store, hash-verified
| 1862 | |
| 1863 | |
| 1864 | public void drawChar(PGraphics g, char c, float x, float y, float size) { |
| 1865 | g.pushMatrix(); |
| 1866 | float s = size / face.unitsPerEm; |
| 1867 | g.translate(x, y); |
| 1868 | g.scale(s, -s); |
| 1869 | FontGlyph fg = unicodeGlyphs.get(Character.valueOf(c)); |
| 1870 | if (fg != null) g.shape(fg); |
| 1871 | g.popMatrix(); |
| 1872 | } |
| 1873 | |
| 1874 | |
| 1875 | public float textWidth(String str, float size) { |
Callers
nothing calls this directly
Tested by
no test coverage detected