31 Commits

Author SHA1 Message Date
Laurenz
ec5384c97f State-based monospace handling 2021-07-25 01:16:38 +02:00
Laurenz
9488b1b850 Main context struct 2021-07-21 11:28:29 +02:00
Laurenz
6a4823461f Reference-count complex values
Rename some nodes types
2021-07-10 23:10:17 +02:00
Laurenz
36b3067c19 Eco string 🌱 2021-07-10 13:07:39 +02:00
Laurenz
0c74290519 Compare functions and templates by identity 2021-07-08 23:36:20 +02:00
Laurenz
470f8001a1 No more collisions between syntax::Tree and layout::Tree 2021-06-30 11:40:27 +02:00
Laurenz
32a6b673bc Make use of wide calls 2021-06-29 13:49:50 +02:00
Laurenz
4017b5a9f6 Push some nodes directly into the stack 2021-06-11 14:42:20 +02:00
Laurenz
4dbd9285c9 Basic enums 2021-06-11 14:00:06 +02:00
Laurenz
3330767c20 Remove props in favor of using state for everything 2021-06-11 11:30:18 +02:00
Laurenz
5afb42ad89 Lists with indent-based parsing
- 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-06-09 00:37:13 +02:00
Laurenz
7218892c72 Refactor path handling 2021-06-01 12:55:07 +02:00
Laurenz
0bfee5b777 Refactored loading and cache architecture 2021-05-28 12:46:43 +02:00
Laurenz
8c27dc1010 Write spaces and linebreaks into text runs ✒ 2021-03-29 15:02:15 +02:00
Laurenz
76fc4cca62 Refactor alignments & directions 📐
- Adds lang function
- Refactors execution context
- Adds StackChild and ParChild enums
2021-03-25 21:32:33 +01:00
Laurenz
5e08028fb3 Syntax functions 🚀
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-21 17:50:56 +01:00
Laurenz
898728f260 Square, circle and ellipse 🔵 2021-03-20 20:19:30 +01:00
Laurenz
264a7dedd4 Scheduled maintenance 🔨
- 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-19 17:57:31 +01:00
Laurenz
54a9ccb1a5 Configurable font edges ⚙
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-19 13:20:58 +01:00
Laurenz
c3acb491e3 Refactor execution context 🏗
- 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-12 14:16:59 +01:00
Laurenz
584a43277d Rename ChildAlign to LayoutAligns ✏ 2021-03-12 14:12:30 +01:00
Laurenz
c1b1dbcc09 Better expansion behaviour 🐪
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-11 10:48:29 +01:00
Laurenz
de37a056ed Split pushed text at newlines ✂ 2021-02-21 11:43:25 +01:00
Laurenz
4d42c79b16 Fix spacing after raw blocks ⬇️ 2021-02-21 11:43:08 +01:00
Laurenz
ed81049ddc Show repr in monospace 📏 2021-02-18 15:06:13 +01:00
Laurenz
db1659a987 Rename any template to func template ✏ 2021-02-12 23:14:29 +01:00
Laurenz
094462cbdd Make templates and strings summable 🥪 2021-02-12 23:11:47 +01:00
Laurenz
790dc9e667 Cleaning 🧹 2021-02-12 22:55:26 +01:00
Laurenz
1711b67877 Move all pretty printing into one module and pretty print values 🦋 2021-02-11 17:33:13 +01:00
Laurenz
f9197dcfef Add arguments value 🏓 2021-02-09 22:56:44 +01:00
Laurenz
06ca740d01 Split evaluation and execution 🔪 2021-02-09 19:46:57 +01:00