summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-05-28Refactored loading and cache architectureLaurenz
2021-05-27Remove hash() from AnyNode since caching is now fully transparentLaurenz
2021-05-27Switch to N64 type aliasLaurenz
2021-05-27Adapt to pdf-writer updateLaurenz
2021-05-26Add a cache for unchanged layoutsMartin Haug
Co-Authored-By: Laurenz <laurmaedje@gmail.com>
2021-05-26Add hash impls for all nodesMartin Haug
This prepares the incremental PR. Co-Authored-By: Laurenz <laurmaedje@gmail.com>
2021-05-23A few predefined colors for testingLaurenz
2021-05-23Stack functionLaurenz
2021-05-22Adapt to pdf-writer updateLaurenz
2021-05-21Refactor parser a bitLaurenz
2021-05-21Rename areas to regionsLaurenz
2021-05-19Reword some doc commentsLaurenz
2021-05-18Leaner argument parsingLaurenz
2021-05-18Rename _new to new and typify to valueLaurenz
2021-05-18Min and max functionsLaurenz
2021-05-18Streamline value comparisonsLaurenz
2021-05-17Convert font units to lengths earlierLaurenz
2021-05-17Tidy up layouting codeLaurenz
2021-05-17Move aspect ratio into stackLaurenz
2021-05-17Rename expand to fixed and switch to boolsLaurenz
2021-05-14Fix compilation on unixLaurenz
2021-05-14Remove resource abstraction and handle images nativelyLaurenz
2021-05-13Expose units_per_em and raw face idLaurenz
2021-05-05Make file system loader serializable 📚Laurenz
2021-04-23Reengineer font and resource loading 🏞Laurenz
2021-04-21Make frames serializable 📚Laurenz
This also makes serialization support non-optional since it's too much feature-management for too little benefit.
2021-04-07Refactor and comment ♻Laurenz
2021-04-07Do binary search and find the outermost glyph with the text index 🔍Laurenz
Co-Authored-By: Martin <mhaug@live.de>
2021-04-06Deduplicate ttf-parser and rustybuzz face 🥞Laurenz
2021-04-05Reshaping with unsafe-to-break ⚡Laurenz
Co-Authored-By: Martin <mhaug@live.de>
2021-04-03Fix multi-page paragraph bugs 🐞Laurenz
2021-04-03New paragraph layout 🚀Laurenz
The previous paragraph layout algorithm had a couple of flaws: - It always produced line break opportunities between runs although on the textual level there might have been none. - It didn't handle trailing spacing correctly in some cases. - It wouldn't have been easily adaptable to Knuth-Plass style optimal line breaking because it was fundamentally structured first-fit run-by-run. The new paragraph layout algorithm fixes these flaws. It proceeds roughly in the following stages: 1. Collect all text in the paragraph. 2. Compute BiDi embedding levels. 3. Shape all runs, layout all children and store the resulting items in a reusable (possibly even cacheable) `ParLayout`. 3. Iterate over all line breaks in the concatenated text. 4. Construct lightweight `LineLayout` objects for full lines instead of runs. These mostly borrow from the `ParLayout` and only reshape the first and last run if necessary. The design allows to use Harfbuzz's UNSAFE_TO_BREAK mechanism to make reshaping more efficient. The size of a `LineLayout` can be measured without building the line's frame. 5. Build only the selected line's frames and stack them.
2021-03-30Baseline alignment ⏏Laurenz
2021-03-30Refactor ♻Laurenz
2021-03-30BiDi reordering 🔃Laurenz
Co-Authored-By: Martin <mhaug@live.de>
2021-03-30Fix space/newline trimming 🐞Laurenz
Co-Authored-By: Martin <mhaug@live.de>
2021-03-30Fix double leading 🐞Laurenz
2021-03-29Fixed par layouter directions 🗜Laurenz
2021-03-29Line break iterating run shaper 🌵Laurenz
Co-Authored-By: Martin <mhaug@live.de>
2021-03-29Write spaces and linebreaks into text runs ✒Laurenz
2021-03-29Move around test cases 🚚Laurenz
2021-03-27Better space coalescing logic 🌧Laurenz
This creates a smaller state machine helper type for softness coalescing, which does not own the resulting nodes. While this creates a bit more duplication in stack and par builder, it makes it a lot easier to integrate additional logic into the paragraph builder. Furthermore: - Line breaks are now "hard", that is, not coalesced with each other. - Text nodes with equal style are now merged allowing for example `f{}i` to form a ligature.
2021-03-25Refactor alignments & directions 📐Laurenz
- Adds lang function - Refactors execution context - Adds StackChild and ParChild enums
2021-03-24Make pdf module top-level 🧱Laurenz
2021-03-24Text shaping 🚀Laurenz
- Shapes text with rustybuzz - Font fallback with family list - Tofus are shown in the first font Co-Authored-By: Martin <mhaug@live.de>
2021-03-22Better font family definitions ✒Laurenz
2021-03-22More consistent documentation 📝Laurenz
2021-03-22Fix bug with line spacing after headings ✅Laurenz
2021-03-21Syntax functions 🚀Laurenz
This adds overridable functions that markup desugars into. Specifically: - \ desugars into linebreak - Two newlines desugar into parbreak - * desugars into strong - _ desugars into emph - = .. desugars into heading - `..` desugars into raw
2021-03-20Square, circle and ellipse 🔵Laurenz