Pretext is a recently released TypeScript library for multiline text measurement and layout that bypasses DOM measurements: https://github.com/chenglou/pretext
{
"id":"ff2521f48f4dc82ebff2c5287da9e66730b6d6d50fd49d25643188bef7d00b3f",
"pubkey":"ccb2f7c3eabae53e31ee439b8a06978d2de6d6e65dbc9e8e7f99af3dbd5d5529",
"created_at":1774827133,
"kind":1,
"tags": [
[
"imeta",
"url https://typo.social/system/media_attachments/files/116/315/048/693/109/359/original/0efd12998385055e.mp4",
"m video/mp4",
"dim 2910x1632",
"blurhash U7PGjYM{ad_3_3%MxtM{xv%Mt7M|~q%Mj[Rj"
],
[
"proxy",
"https://typo.social/users/w__h_/statuses/116315071052940529",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.ditto.pub"
]
],
"content":"From @s3ththompson@x.com: \n“\n\"swiss-style\" / flattersatz ragged text on the web...\n\npretext makes it easy to explore different tradeoffs / constraints around tracking / word spacing / glyph sizing\n\nhttps://seththompson.com/labs/flattersatz/\n”\n\nPretext is a recently released TypeScript library for multiline text measurement and layout that bypasses DOM measurements:\nhttps://github.com/chenglou/pretext\n\nhttps://typo.social/system/media_attachments/files/116/315/048/693/109/359/original/0efd12998385055e.mp4",
"sig":"722b79e162259ad50b8db28e47acecbd7dfb86809848874b30f8da3200a33146092441510ad1ba67f5119463d9fbb826126234613c35577cbd59a2431194141a"
}