text-pixel-width Get pixel width of a text Usage const { getWidth } = require("text-pixel-width") const pixels = getWidth("Hello world!", "Arial", 16) Adding fonts Run node generate.js then make a pull request.