> glyphline: text highlights for pdf.js pages and HTML. One npm package, `glyphline`, with > subpaths glyphline/react, glyphline/svelte, glyphline/pdf, glyphline/dom. Rules for coding agents: > https://glyphline.lucaspiera.com/docs/agents (also node_modules/glyphline/AGENTS.md). > All docs in one file: https://glyphline.lucaspiera.com/llms-full.txt # glyphline - [Introduction](/docs): glyphline draws text highlights that sit on the glyphs, a sentence outline that morphs and a word cursor that glides, for pdf.js pages and HTML. - [Getting started](/docs/getting-started): Install glyphline, put an svg over your text and move the highlights. - [Playground](/docs/playground): Every timing and shape option of createHighlighter, live on a PDF page. - [For humans and agents](/docs/agents): How to read these docs as a person, and what a coding agent (Claude Code, Cursor, Codex) should load before writing glyphline code. - **Frameworks** - React - [React overview](/docs/react): glyphline/react, the GlyphOverlay component and hooks for React 18 and 19. - [PDF pages](/docs/react/pdf): A pdf.js page component with the text layer and a glyphline overlay. - [Selection and marks](/docs/react/selection): Draw the selection, snap it to words and keep it as marks, in React. - [React API](/docs/react/api): GlyphOverlay, useHighlighter, useDomSource and useAsyncSource. - Svelte - [Svelte overview](/docs/svelte): glyphline/svelte, the GlyphOverlay component, the highlight action and reactive sources for Svelte 5. - [PDF pages](/docs/svelte/pdf): A pdf.js page component with the text layer and a glyphline overlay, in Svelte 5. - [Selection and marks](/docs/svelte/selection): Draw the selection, snap it to words and keep it as marks, in Svelte 5. - [Svelte API](/docs/svelte/api): GlyphOverlay, the highlight action, the glyphline attachment, domText and asyncText. - **Guides** - [PDF pages](/docs/pdf): Render a pdf.js page with its text layer and put glyphline on top. - [HTML text](/docs/html): Highlight ordinary HTML with domSource; it follows reflow and inline markup. - [Selection and marks](/docs/selection): Draw the reader's selection as one shape, snap it to words and keep it as a mark. - [Read-aloud](/docs/read-aloud): Drive the word cursor from speechSynthesis word boundaries, with a timer fallback. - [Styling](/docs/styling): Colours, blend mode, dark mode and class names. - **How it works** - [Motion](/docs/motion): How the word cursor and the sentence outline move, frame by frame. - [Accuracy](/docs/accuracy): Why word boxes from the pdf.js text layer drift, and how glyphline places them on the glyphs. - **Reference** - [Core API](/docs/api): createHighlighter, text sources, targets and the exported geometry. - [Limits](/docs/limits): What glyphline does not do yet, and where its boxes are less precise.