summaryrefslogtreecommitdiff
path: root/src/library/mod.rs
AgeCommit message (Collapse)Author
2021-09-28Allow linear values for text edgesLaurenz
2021-09-10Rename `Arguments` to `Args`Laurenz
2021-08-31More utility functionsLaurenz
- join("a", "b", "c", sep: ", ") - int("12") - float("31.4e-1") - str(10) - sorted((3, 2, 1))
2021-08-30Add abs() functionLaurenz
2021-08-30Lower- and uppercase string conversion functionsLaurenz
2021-08-29Allow body for font function once againLaurenz
2021-08-23Links! (#43)Martin
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2021-08-19Refactor layouting a bitLaurenz
Notably: - Handle aspect ratio in fixed node - Inline constraint inflation into pad node
2021-08-17Library functions behave more imperativelyLaurenz
- Templates scope state changes - State-modifying function operate in place instead of returning a template - Internal template representation contains actual owned nodes instead of a pointer to a syntax tree + an expression map - No more wide calls
2021-08-14Separate type for string valuesLaurenz
2021-07-30Fatal errorsLaurenz
- Makes errors fatal, so that a phase is only reached when all previous phases were error-free - Parsing still recovers and can produce multiple errors - Evaluation fails fast and can thus produce only a single error (except for parse errors due to an import) - The single error that could occur during execution is removed for now - Removes Value::Error variant
2021-07-29Move font family and refactor alignmentLaurenz
2021-07-29Move EcoString and OptionExt into utilLaurenz
2021-07-11Simpler castingLaurenz
2021-07-10Reference-count complex valuesLaurenz
Rename some nodes types
2021-07-10Eco string 🌱Laurenz
2021-07-08Rename Fill to PaintLaurenz
2021-06-26Add box and block functionsLaurenz
2021-06-26Cleanse libraryLaurenz
- Remove doc-comments for Typst functions from library - Reduce number of library source files
2021-06-25Make font take everything as keyword argumentsLaurenz
2021-06-18Len function for strings, arrays and dictionariesLaurenz
2021-06-11Remove props in favor of using state for everythingLaurenz
2021-06-10Text decorationsMartin Haug
2021-06-09Add a grid layouterMartin Haug
2021-06-09Lists with indent-based parsingLaurenz
- Unordered lists with indent-based parsing and basic layout using stacks - Headings are now also indent based - Removes syntax functions since they will be superseded by select & transform
2021-05-23A few predefined colors for testingLaurenz
2021-05-23Stack functionLaurenz
2021-05-18Rename _new to new and typify to valueLaurenz
2021-05-18Min and max functionsLaurenz
2021-04-23Reengineer font and resource loading 🏞Laurenz
2021-03-29Move around test cases 🚚Laurenz
2021-03-25Refactor alignments & directions 📐Laurenz
- Adds lang function - Refactors execution context - Adds StackChild and ParChild enums
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-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
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-17Switch from name to ratio for font stretch parameter 📐Laurenz
2021-03-17Rename box to rect and color to fill ✏Laurenz
2021-03-13Factor out alignment deduplication into separate function ♻Laurenz
2021-03-10Pad function 🔲Laurenz
2021-03-10Move around library types 🚚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-02-18Show repr in monospace 📏Laurenz
2021-01-30Capture variable by slot instead of value 🎣Laurenz
2021-01-22Many more expressions 🥗Laurenz
Boolean, equality, comparison and assignment expression parsing and evaluation.
2021-01-15Split state and scopes, less ref-counting 🔀Laurenz