summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-03-19Scheduled maintenance ๐Ÿ”จLaurenz
- New naming scheme - TextNode instead of NodeText - CallExpr instead of ExprCall - ... - Less glob imports - Removes Value::Args variant - Removes prelude - Renames Layouted to Fragment - Moves font into env - Moves shaping into layout - Moves frame into separate module
2021-03-19Add basic paragraph function ๐Ÿ“‘Laurenz
Allows to change: - (paragraph) spacing - leading - word-spacing
2021-03-19Configurable font edges โš™Laurenz
Adds top-edge and bottom-edge parameters to the font function. These define how the box around a word is computed. The possible values are: - ascender - cap-height (default top edge) - x-height - baseline (default bottom edge) - descender The defaults are chosen so that it's easy to create good-looking designs with vertical alignment. Since they are much tighter than what most other software uses by default, the default leading had to be increased to 50% of the font size and paragraph spacing to 100% of the font size. The values cap-height and x-height fall back to ascender in case they are zero because this value may occur in fonts that don't have glyphs with cap- or x-height (like Twitter Color Emoji). Since cap-height is the default top edge, doing no fallback would break things badly. Removes softness in favor of a simple boolean for pages and a more finegread u8 for spacing. This is needed to make paragraph spacing consume line spacing created by hard line breaks.
2021-03-19Merge text and shape PDF loops ๐ŸŽกMartin Haug
2021-03-17Formatting and documentation โœจLaurenz
2021-03-17Switch from name to ratio for font stretch parameter ๐Ÿ“Laurenz
2021-03-17Rename box to rect and color to fill โœLaurenz
2021-03-17Fixes in TextMate grammar โœ…Laurenz
2021-03-13Factor out alignment deduplication into separate function โ™ปLaurenz
2021-03-12Fix pagebreak-in-box bug โœ”Laurenz
2021-03-12Refactor execution context ๐Ÿ—Laurenz
- The execution context is a lot more structured: Instead of a magic stack of arbitrary objects there are static objects for pages, stacks and paragraphs - Page softness/keeping mechanic is now a lot simpler than before
2021-03-12Rename ChildAlign to LayoutAligns โœLaurenz
2021-03-11Better expansion behaviour ๐ŸชLaurenz
This makes expansion behaviour inheritable by placing it into the area and passing it down during layouting instead of computing some approximation of what we want during execution.
2021-03-10Pad function ๐Ÿ”ฒLaurenz
2021-03-10Move around library types ๐ŸššLaurenz
2021-03-10Better line spacing calculations โ†•Laurenz
- Only add line spacing between lines. Previously, line spacing was added below every line, making `#box[word]` higher than just `word`. - Compute box height of text as `ascender - descender` so that the full word is contained in the box.
2021-03-09Rename run to line and add some explanatory comments โœLaurenz
The name run was a relict of the time where a line consisted of a set of runs with same alignment. While these runs still exist conceptually, they are all stored flatly together in what was now renamed from `run` to `line`.
2021-03-03Documentation fixes โœ”Laurenz
2021-03-03Callee expressions ๐Ÿ…Laurenz
2021-03-03Show name of user-defined functions in representation ๐Ÿฆ‹Laurenz
2021-03-03Closures and function definitions ๐Ÿš€Laurenz
Supports: - Closure syntax: `(x, y) => z` - Shorthand for a single argument: `x => y` - Function syntax: `let f(x) = y` - Capturing of variables from the environment - Error messages for too few / many passed arguments Does not support: - Named arguments - Variadic arguments with `..`
2021-03-02Simplify collection parsing โ™ปLaurenz
In preparation for closure expressions.
2021-03-02Replace default fonts ๐Ÿ†•Laurenz
2021-03-02Remove dependencies on itoa and ryu โฌ‡๏ธLaurenz
2021-02-24Cleaner control flow in for loop evaluation ๐ŸงผLaurenz
2021-02-24While loops ๐Ÿ”Laurenz
2021-02-24Index + value iteration for arrays ๐ŸฆšLaurenz
2021-02-21Split pushed text at newlines โœ‚Laurenz
2021-02-21Fix spacing after raw blocks โฌ‡๏ธLaurenz
2021-02-18Update coma example โฌ†๏ธLaurenz
2021-02-18Show repr in monospace ๐Ÿ“Laurenz
2021-02-18Refresh parser ๐ŸŒŠLaurenz
2021-02-18Refresh tokenizer ๐ŸŒŠLaurenz
2021-02-12Rename any template to func template โœLaurenz
2021-02-12Make templates and strings summable ๐ŸฅชLaurenz
2021-02-12Early quit loop when body returns error ๐Ÿ›‘Laurenz
2021-02-12Cleaning ๐ŸงนLaurenz
2021-02-11Small fixes โ™ปLaurenz
2021-02-11Move span directly into diagnostics ๐ŸššLaurenz
2021-02-11Move all pretty printing into one module and pretty print values ๐Ÿฆ‹Laurenz
2021-02-09Add arguments value ๐Ÿ“Laurenz
2021-02-09Split evaluation and execution ๐Ÿ”ชLaurenz
2021-02-07Remove captured expression ๐Ÿ—‘๏ธLaurenz
2021-02-07Dry-clean visitor with a macro ๐ŸœLaurenz
2021-02-06Generalize child of NodeBackground ๐ŸผMartin Haug
2021-02-06Merge `rect` and `box` ๐ŸฆšMartin Haug
2021-02-04Add rectangle function ๐ŸŽ›Martin Haug
2021-02-04Fix counting bug โœ…Laurenz
2021-02-03Tidy up raw blocks ๐ŸงนLaurenz
- Better trimming (only trim at the end if necessary) - Fixed block-level layouting - Improved pretty printing - Flip inline variable to block - Flip inline variable to display for math formulas
2021-01-31Refresh tests ๐Ÿ”„Laurenz