Laurenz
148a06c070
Switch from state to decorations for underline/strikethrough/overline
2021-08-24 00:41:15 +02:00
Martin
d546453880
Links! ( #43 )
...
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2021-08-23 23:56:33 +02:00
Laurenz
0806af4aec
Kerned PDF output
2021-08-23 13:21:44 +02:00
Laurenz
c0377de653
Shorter/clearer field name for geometry types
...
Size { width, height } => Size { w, h }
Spec { horizontal, vertical } => Spec { x, y }
Gen { cross, main } => Gen { inline, block }
2021-08-21 19:08:47 +02:00
Laurenz
3932bb2cb9
New source loading architecture
2021-08-09 11:26:41 +02:00
Laurenz
9488b1b850
Main context struct
2021-07-21 11:28:29 +02:00
Laurenz
fd0b89a1d8
Rename Fill to Paint
2021-07-08 22:33:44 +02:00
Martin
80a9b300d1
Ref count the frames
2021-06-18 13:01:55 +02:00
Laurenz
3330767c20
Remove props in favor of using state for everything
2021-06-11 11:30:18 +02:00
Martin Haug
c28708aa19
Text decorations
2021-06-10 23:15:51 +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
e8057a5385
Make pdf module top-level 🧱
2021-03-24 21:48:25 +01:00
Laurenz
73615f7e3c
Text shaping 🚀
...
- 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-24 17:12:34 +01:00
Laurenz
898728f260
Square, circle and ellipse 🔵
2021-03-20 20:19:30 +01:00
Martin
6cb9fe9064
Text colors 🦩 ( #18 )
2021-03-19 22:36:13 +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
Martin Haug
bd12d135ca
Merge text and shape PDF loops 🎡
2021-03-19 11:05:23 +01:00
Laurenz
bbb9ed07ff
Better line spacing calculations ↕
...
- 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-10 10:20:01 +01:00
Laurenz
a2fcc1bf28
Small fixes ♻
2021-02-11 22:24:42 +01:00
Laurenz
c80e13579f
Dry-clean visitor with a macro 🏜
2021-02-07 13:14:28 +01:00
Martin Haug
80e076814d
Merge `rect` and `box` 🦚
2021-02-06 12:30:44 +01:00
Martin Haug
8469bad748
Add rectangle function 🎛
2021-02-04 21:30:18 +01:00
Laurenz
aae67bd572
Move and rename many things 🚛
2021-01-03 00:12:09 +01:00
Laurenz
6f111f9410
Test [font] 🧣
2020-12-17 15:43:30 +01:00
Laurenz
0cfce1de7e
Switch to miniz_oxide 🔼
2020-12-11 12:37:20 +01:00
Laurenz
fdc1b378a3
Compress images in PDFs ⚙
2020-11-30 22:07:08 +01:00
Laurenz
21857064db
Export alpha channel into PDF 🧊
2020-11-28 00:04:40 +01:00
Laurenz
982e7671a6
Embed each image only once into the PDF 🥔
2020-11-27 23:17:25 +01:00
Laurenz
475ca7a62e
Basic environment and resource loader 🏞
2020-11-27 22:35:42 +01:00
Laurenz
bc997b7c33
Export images in PDF 🖼
2020-11-27 20:01:54 +01:00
Laurenz
761931405c
Use newly stabilized intra doc links ↩
2020-11-24 16:12:41 +01:00
Laurenz
f105663037
Basic image support 🖼
...
- [image] function
- Image rendering in tests
- Supports JPEG and PNG
- No PDF export so far
2020-11-20 16:36:22 +01:00
Laurenz
2e6e6244cc
Switch to pdf-writer ⬆️
2020-11-19 23:46:51 +01:00
Laurenz
d3bc4ec073
Refactor layouting base 🪁
2020-10-11 22:38:30 +02:00
Laurenz
92c01da360
Switch back to custom geometry types, unified with layout primitives 🏞
2020-10-10 22:19:36 +02:00
Laurenz
13230db68c
Fix some clippy warnings ✔
2020-10-07 19:28:34 +02:00
Laurenz
335fa2d118
Small improvements 🍪
2020-10-04 23:31:35 +02:00
Laurenz
c1dd872b34
Remove unncessary wrappers and typedefs 🛑
2020-10-04 19:57:39 +02:00
Laurenz
6672f8f7df
Remove Typesetter in favor of typeset function 🎯
2020-10-04 18:18:55 +02:00
Laurenz
0fc25d732d
Port to kurbo 🎋
2020-10-03 13:23:59 +02:00
Laurenz
7143e10afc
Streamline font handling a bit 📜
2020-09-30 13:18:42 +02:00
Laurenz
181f756a9e
Format everything with rustfmt! 💚
2020-08-30 22:18:55 +02:00
Laurenz
2a92428ff6
Do as Dolores says ⚡
2020-08-27 21:47:26 +02:00
Laurenz
dbfb3d2ced
Formatting, documentation and small improvements 🧽
2020-08-03 16:04:55 +02:00
Laurenz
266d457292
Refactor model into tree 🛒
2020-08-02 22:05:49 +02:00
Laurenz
cbbc46215f
Layout elements and pure rust rendering 🥏
2020-08-02 21:17:42 +02:00
Laurenz
659248d52f
Raw lengths 🚲
...
Replace unitless length with raw f64 and introduce length type with unit.
2020-08-01 19:15:55 +02:00
Laurenz
06dbac6efd
Port font handling to fontdock and ttf-parser 🛳
...
- Use fontdock for indexing fonts and querying
- Typst binary now automatically indexes and uses system fonts in addition to a fixed font folder!
- Removes subsetting support for now (was half-finished anyways, plan is to use harfbuzz for subsetting in the future)
- Adds font width configuration support
2020-08-01 00:10:54 +02:00
Laurenz
bbcdeb128c
Move, rename and switch some things (boring) 🚚
...
- Problems -> Diagnostics
- Position -> Pos
- offset_spans -> Offset trait
- Size -> Length (and some more size types renamed)
- Paper into its own module
- scope::Parser -> parsing::CallParser
- Create `Decorations` alias
- Remove lots of double newlines
- Switch from f32 to f64
2020-07-29 18:09:51 +02:00
Laurenz
3150fd5643
Better Debug/Display and Derives 🧽
2020-02-03 12:22:02 +01:00
Laurenz
40ea35cbe7
Upgrade to new toddle interface 🐳
2020-02-03 10:37:50 +01:00
Laurenz
20fb4e7c37
Document everything 📜
2020-01-26 15:51:13 +01:00
Laurenz
0a087cd28b
Reorganize modules 🧱
2020-01-24 16:23:57 +01:00
Laurenz
a93b1ab003
Formatting 🛀
2020-01-06 12:50:20 +01:00
Laurenz
7b84f3b553
Adopt new font loading engine ⚙
2020-01-04 22:43:26 +01:00
Laurenz
ff107cf3e7
Tidying up 🧹
2019-12-12 22:19:38 +01:00
Laurenz
7e98022435
Bad stack layouter 🚑
2019-12-09 13:29:04 +01:00
Laurenz
f5b104d0da
Rename crate `typst` -> `typstc` ✏
2019-12-05 20:29:55 +01:00
Laurenz
72a9631b03
Move arg parser into `FuncArgs` and create (incomplete) consistent map 🧭
2019-12-05 19:48:37 +01:00
Laurenz
9fb31defd0
Expand functionality of function! macro 🛰
2019-12-04 19:35:28 +01:00
Laurenz
261ef9e33a
Generalize tree layouter 🌲
2019-11-16 10:37:30 +01:00
Laurenz
991e879e1d
Extend stack layouts from vertical to horizontal flows ➡
2019-10-17 19:21:47 +02:00
Laurenz
f2f05e07b0
Implement space extension (multipage) ➕
2019-10-16 21:31:14 +02:00
Laurenz
a3c667895e
Refactor the main layouter ♻
2019-10-15 18:15:36 +02:00
Laurenz
5e41672a91
Refactor and refine PDF exporter ♻
2019-10-14 18:07:18 +02:00
Laurenz
7c0899b537
Run rustfmt 🚿
2019-10-13 13:10:21 +02:00
Laurenz
463e4ebd82
Refactor layout types 🚧
2019-10-13 12:08:07 +02:00
Laurenz
6f22e4f13c
Render debug boxes 🧭
2019-10-11 20:28:22 +02:00
Laurenz
f22a307000
Extract into separate repository 🧱
2019-10-09 19:46:42 +02:00
Laurenz Mädje
b96a7e0cf3
Reuse font loader across compilations 🔋
2019-07-28 22:27:09 +02:00
Laurenz Mädje
6c8b5caa9f
Improve subsetter testing ✔
2019-07-27 21:15:10 +02:00
Laurenz
7eec0b8dd7
Add more tests for table parsers 🔋
2019-06-25 21:07:06 +02:00
Laurenz
030d301f0c
Refactor subsetter 🧰
2019-06-23 13:32:47 +02:00
Laurenz
c7ee2b393a
Fix top-left text alignment 📐
2019-06-22 12:51:06 +02:00
Laurenz
b53ad6b1ec
Introduce flex layouting 🎈
2019-06-17 10:08:16 +02:00
Laurenz Mädje
236ebab23a
Add more fonts 📜
2019-06-02 19:51:37 +02:00
Laurenz Mädje
3e9f42661e
Move to top-left default positioning 📐
2019-06-02 19:15:45 +02:00
Laurenz
c38e17d91f
Thoroughly improve documentation 📝
2019-05-26 21:59:33 +02:00
Laurenz
b3734bbc04
Restructure engine into modular layouter 🍂
2019-05-24 12:24:10 +02:00
Laurenz
c384e52480
Improve code quality 🎫
2019-04-29 13:41:00 +02:00
Laurenz Mädje
98c3788cf1
Fix PDF conformance bugs 🚧
...
- /DocumentCatalog -> /Catalog
- BT/ -> BT
- OpenType -> TrueType (for now)
2019-04-05 14:01:10 +02:00
Laurenz
e589843966
Implement font fallback 🚀
2019-04-01 10:01:42 +02:00
Laurenz
a522a15a66
Insert default glyph when subsetting ⚙
2019-03-31 15:47:57 +02:00
Laurenz
0b2ae78534
Write ToUnicode mapping 📜
2019-03-31 14:13:10 +02:00
Laurenz
5ca303ecad
Make things more consistent ♻
2019-03-30 20:58:46 +01:00
Laurenz
e6e5aad7ce
Refactor font providing ⚙
2019-03-30 18:47:17 +01:00
Laurenz
db96ecae94
Move some types into better places 🧱
2019-03-30 16:58:45 +01:00
Laurenz
f683bba400
Create error_type! macro ✔
2019-03-30 16:42:52 +01:00
Laurenz
10994ebac3
Move exporting into seperate module 🧱
2019-03-30 16:01:45 +01:00