
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@codepunkt/wasm-layout-text
Advanced tools
Layouts text and returns the result as an UInt8Array of pixels
This package layouts text and returns the result as an UInt8Array of pixels. It supports:
The package provides a render function that returns an UInt8Array of pixels:
const { readFileSync } = requir("fs");
const { join } = require("path");
const wlt = require("@codepunkt/wasm-layout-text");
const font = readFileSync(join(__dirname, "myfont.ttf"));
const buffer = wlt.render(
// text, size, color, ttf font buffer
new wlt.Text("Hello world", 64, new wlt.RgbColor(91, 214, 123), font),
// image dimension
new wlt.Dimension(1200, 630),
// text bounds
new wlt.Dimensions(1100, 530),
// text position
new wlt.Position(50, 50),
// text alignment
new wlt.Alignment(wlt.HorizontalAlign.Left, wlt.VerticalAlign.Top)
);
You can then use Jimp or other image processing libraries to
Contributions are welcome! A JavaScript usage example with Jimp is available in the example directory.
There are a few make tasks, most notably:
make build: will build rust code from ./src to JavaScript code in ./pkg (using wasm-pack)make node: executes the example code with Node.js and uses the local JavaScript package from .pkg to render all alignment permutations (expects the ./pkg folder to exist)FAQs
Layouts text and returns the result as an UInt8Array of pixels
We found that @codepunkt/wasm-layout-text demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.