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