pretext icon indicating copy to clipboard operation
pretext copied to clipboard

Fast, accurate & comprehensive text measurement & layout

Results pretext issues
Sort by recently updated
recently updated
newest added

Today you call `prepare(text, font)`, keep the handle it returns, and call `layout(handle, width, lineHeight)` on every resize. That handle is a cache the app has to carry: store it...

**Versions:** `@chenglou/pretext` 1.0.0 from npm. Firefox 160.0 on macOS (the installed release, driven by Playwright over WebDriver BiDi), compared with Chromium 149 and WebKit (Safari 26.5) on the same machine....

For Shantell Sans at weight 700, `prepareWithSegments` + `layoutWithLines` chooses a different break position than the browser's `` wrap in Chrome and Firefox. The DOM shows 3 rows of 15...

I'm seeing two line-count differences from Chrome at `0d102a5c`: | Items, all in the same font | Pretext lines | Chrome lines / block height | | --- | ---...

The WebKit profile gives a tab its stop unless that stop is under half a space away (`tabMinimumCharacter: engine === 'gecko' ? '0' : ' '` in `src/measurement.ts`). WebKit skips...

Related to #210, but this reproduction concerns ZWSP after an oversized inline image rather than at paragraph start. Our editor keeps a ZWSP after each image as a caret anchor;...

Some Hebrew display fonts (the Lia family; copyrighted, I can send one by email) ligate a word-final letter under `ccmp`/`calt` only when a following letter is in the same shaping...

I work with Hebrew fonts, there are some characters that only ligate when the canvas `direction` is `rtl`, otherwise they stay as 2 distinct chars and the width is miscalculated....

Rich inline allows mixed formatted content, but it explicitly says that pre-wrap is not supported. Is there a reason we can't support whitespace preservation? I'm working on a Canva style...

Hi — I'm using Pretext in a paginated document editor, where `layout().lineCount` feeds directly into the height we reserve for a paragraph or table cell. I've run into a case...