Commit Graph

272 Commits

Author SHA1 Message Date
Laurenz 5110a41de1 Introduce virtual typesetter 2022-12-02 13:21:36 +01:00
Laurenz 9db6e533cd Make content a bit more compact 2022-11-26 15:34:02 +01:00
Laurenz 46921a8c28 Separate test crate
This removes the not-really-cyclic dependency that confuses rust-analyzer. See also: https://github.com/rust-lang/rust-analyzer/issues/2414
2022-11-03 16:13:35 +01:00
Laurenz 37a7afddfa Split crates 2022-11-03 13:35:39 +01:00
Laurenz c0e972b91a Reduce dependencies from compiler on library 2022-10-18 00:04:12 +02:00
Laurenz e218226655 Merge some modules 2022-10-17 20:04:22 +02:00
Laurenz 54b38c4790 Bump dependencies 2022-10-15 17:37:01 +02:00
Laurenz 5a8534a395 Parse basic math syntax 2022-10-04 13:45:16 +02:00
Laurenz 7ef6cb31df Bump ttf-parser 2022-09-30 11:23:09 +02:00
Laurenz 8b4210669b Add `comemo` as git dependency 2022-09-25 19:43:26 +02:00
Laurenz fffb55f79a JSON reading 2022-09-25 17:37:16 +02:00
Laurenz ddd3b6a82b Tracked memoization 2022-09-21 20:25:57 +02:00
Laurenz 757a701c1a A New World 2022-09-20 16:37:15 +02:00
Laurenz e29f55bb29 Remove font store 2022-09-19 17:44:40 +02:00
Laurenz 9362c279de CSV reading 2022-07-27 00:09:15 +02:00
Laurenz 891af17260 Bump lipsum 2022-06-13 19:44:57 +02:00
Laurenz ed6550fdb0 Bump dependencies 2022-06-10 23:54:16 +02:00
Laurenz 806d9f0d9a Pure functions! 2022-05-26 17:14:44 +02:00
Laurenz 3965e10281 Hack in ReX for now 2022-05-18 19:09:57 +02:00
Laurenz 507c5fc925 Text replacement show rules 2022-05-04 00:14:31 +02:00
Martin Haug 649c101f07 Add blind text function 2022-04-25 14:20:47 +02:00
Laurenz c5b3f8ee98 Switch to `unscanny` 2022-04-16 22:23:57 +02:00
Laurenz c3a387b8f7 Segment by script 2022-04-12 22:23:08 +02:00
Laurenz beca01c826 Methods 2022-03-18 23:43:58 +01:00
Laurenz b71113d37a Hyphenation 2022-03-08 19:49:26 +01:00
Laurenz 4f85fc3acd Remove dependency on itertools 2022-02-26 00:13:44 +01:00
Laurenz 2bf32c51bc Remove layout cache 2022-02-22 12:42:02 +01:00
Laurenz 61d1e1a683 Remove layout-cache feature 2022-02-18 17:33:13 +01:00
Laurenz 68503b9a07 Redesigned template layout 2022-02-07 20:00:21 +01:00
Martin Haug 9a9c6f22c4 Add evasion of glyph shape for under- and overlines 2022-02-04 00:30:23 +01:00
Martin Haug 4f66907d08 Add Code Block syntax highlighting 2022-01-27 22:04:45 +01:00
Laurenz 3739ab7720 Export into rendered images 2022-01-24 17:39:49 +01:00
Laurenz db158719d6 Simplify CLI 2022-01-24 16:44:52 +01:00
Laurenz 5d5d8a21cf Bump and lock dependencies 2022-01-01 12:23:00 +01:00
Laurenz 958f74f777 Set Rules Episode VIII: The First Macro 2021-12-16 14:43:02 +01:00
Laurenz 40b87d4066 Set Rules Episode II: Attack of the properties 2021-12-07 16:36:39 +01:00
Martin Haug 738ff7e1f5 Reduce the size of the `FramesEntry` struct and bump edition 2021-12-13 15:56:14 +01:00
Martin Haug 7c829c5c1b Bump pdf-writer, svg2pdf and error messages
Co-Authored-By: Laurenz <laurmaedje@gmail.com>
2021-12-07 00:06:54 +01:00
Martin Haug f15ee7efb6 Add SVG capabilities 2021-12-06 14:58:57 +01:00
Laurenz 2982020480 Bump pdf-writer 2021-12-04 21:55:23 +01:00
Laurenz e915cc4ef0 No more duplicate debug prints due to incremental tests 2021-11-29 23:22:53 +01:00
Laurenz 8a88f71cb1 Transformations 2021-11-23 22:04:08 +01:00
Laurenz 02f114d072 Remove decorum 2021-11-22 15:50:35 +01:00
Laurenz cef46e6c40 Strokes 2021-11-20 15:51:07 +01:00
Laurenz 5e06941c63 Iterate over grapheme clusters instead of chars 2021-10-05 17:57:30 +02:00
Laurenz 2760e11145 Put rand behind layout cache feature 2021-09-29 00:09:41 +02:00
Laurenz d2618acd8d Bump pdf-writer 2021-09-09 12:16:55 +02:00
Laurenz 0001a965d7 Parse command line arguments with pico-args 2021-08-27 14:08:17 +02:00
Laurenz 7a2e3c80b5 PDF bug fixes
- Write correct subtype for CID Font
- Write CIDToGIDMap attribute
- Deduplicate CMap pairings
- Bump pdf-writer for string primitive fix
2021-08-24 17:18:50 +02:00
Laurenz 0806af4aec Kerned PDF output 2021-08-23 13:21:44 +02:00
Martin fdab7158c9
Pattern properties (#42)
Included in this package are:
* Code review I: The unnamed review.
* Code Review II: How I met your review.
* Code Review III: Code, the final frontier. These are the voyages of the USS Review ...
2021-08-19 15:07:11 +02:00
Martin c44ecbfbd2
Move to exclusively oneshot benchmarks with Iai fork (#41) 2021-08-18 18:12:26 +02:00
Laurenz 3c92bad9a7 Pretty-printed diagnostics with traceback 2021-08-01 00:00:36 +02:00
Laurenz 859275b17b Bump dependencies 2021-06-30 22:56:45 +02:00
Laurenz 1c43d8af12 Bump dependencies 2021-06-30 00:52:50 +02:00
Martin Haug 21d919e2d2 Put incremental compilation behind feature 2021-06-29 12:33:24 +02:00
Martin 80a9b300d1 Ref count the frames 2021-06-18 13:01:55 +02:00
Laurenz 7218892c72 Refactor path handling 2021-06-01 12:55:07 +02:00
Laurenz 00ac68b845 Fix and improve
- Set context location to resolved path during module evaluation.
- Dump module diagnostics on import
- Use same-file for more robustness than fs::canonicalize
2021-05-31 22:33:40 +02:00
Laurenz 0bfee5b777 Refactored loading and cache architecture 2021-05-28 12:46:43 +02:00
Martin Haug e27f6c1014 Add hash impls for all nodes
This prepares the incremental PR.

Co-Authored-By: Laurenz <laurmaedje@gmail.com>
2021-05-26 22:57:29 +02:00
Laurenz 6292d25afb Reengineer font and resource loading 🏞 2021-04-23 17:46:14 +02:00
Laurenz 72478946c2 Make frames serializable 📚
This also makes serialization support non-optional since it's too much feature-management for too little benefit.
2021-04-21 21:17:25 +02:00
Laurenz 076e767b0e Do binary search and find the outermost glyph with the text index 🔍
Co-Authored-By: Martin <mhaug@live.de>
2021-04-07 00:24:42 +02:00
Laurenz 464a6ff75e Deduplicate ttf-parser and rustybuzz face 🥞 2021-04-06 15:13:20 +02:00
Laurenz de20a21a58 Reshaping with unsafe-to-break
Co-Authored-By: Martin <mhaug@live.de>
2021-04-05 22:32:09 +02:00
Laurenz 79948c0c5e BiDi reordering 🔃
Co-Authored-By: Martin <mhaug@live.de>
2021-03-30 14:31:50 +02:00
Laurenz 309b8f20a8 Line break iterating run shaper 🌵
Co-Authored-By: Martin <mhaug@live.de>
2021-03-29 15:02:15 +02: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 6720520ec0 Render svg emoji 🐳 2021-03-23 15:32:36 +01:00
Laurenz 3fb1f59f1e Bump tiny-skia to 0.5 🔼 2021-03-23 13:17:00 +01:00
Laurenz 3c74e4566a Faster compile times and test execution
- Optimize only dependencies, not the main crate
- Don't generate debug info
- Don't generate PDFs for all tets by default
2021-03-13 14:18:31 +01:00
Laurenz 45abcf6b2b Remove dependencies on itoa and ryu ⬇️ 2021-03-02 15:45:01 +01:00
Laurenz 0f0416054f Move value tests + smarter number formatting 🔢 2021-01-15 15:43:59 +01:00
Laurenz cfcb36b159 Move test files into category subfolders 🚚 2021-01-14 16:47:29 +01:00
Laurenz 0cfce1de7e Switch to miniz_oxide 🔼 2020-12-11 12:37:20 +01:00
Laurenz 1cbd5f3051 Refine test infrastructure
- Tests diagnostics
- More and better separated image tests
2020-12-10 22:45:45 +01:00
Laurenz fdc1b378a3 Compress images in PDFs ⚙ 2020-11-30 22:07:08 +01:00
Laurenz b4f809f1ea Move benchmarks into separate crate ♾
So that CI does not have to build criterion each time.
2020-11-25 19:28:04 +01:00
Laurenz e30d896c7b Switch to tiny-skia 🎨 2020-11-25 18:46:47 +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 7ec7c49144 Don't panic 🌶 2020-11-05 13:07:13 +01:00
Laurenz 22697f0c0c Simple regression testing with file-based comparisons 2020-10-13 12:34:11 +02:00
Laurenz 1736bfc194 Rename typstc -> typst ✏ 2020-10-13 11:47:29 +02:00
Laurenz dd4a4545a6 Move main back into src/ 📨 2020-10-12 21:26:58 +02:00
Laurenz 38157b0e0c Synchronous layout 🪀 2020-10-12 17:10:01 +02:00
Laurenz 92c01da360 Switch back to custom geometry types, unified with layout primitives 🏞 2020-10-10 22:19:36 +02:00
Laurenz a41d7ab47d Expression evaluation with Eval trait 🧮 2020-10-04 20:07:01 +02:00
Laurenz 0fc25d732d Port to kurbo 🎋 2020-10-03 13:23:59 +02:00
Laurenz 3533268b1f Refactor parser 🏞 2020-10-02 15:43:29 +02:00
Laurenz ee11f87175 Enable features by default 💜 2020-09-30 12:53:02 +02:00
Laurenz fd9959fd04 Add end-to-end typesetting benchmark 🖊 2020-08-19 20:51:36 +02:00
Laurenz 30f16bbf64 Add Value type and replace dyn-nodes with call-exprs 🏗
- In addition to syntax trees there are now `Value`s, which syntax trees can be evaluated into (e.g. the tree is `5+5` and the value is `10`)
- Parsing is completely pure, function calls are not parsed into nodes, but into simple call expressions, which are resolved later
- Functions aren't dynamic nodes anymore, but simply functions which receive their arguments as a table and the layouting context
- Functions may return any `Value`
- Layouting is powered by functions which return the new `Commands` value, which informs the layouting engine what to do
- When a function returns a non-`Commands` value, the layouter simply dumps the value into the document in monospace
2020-08-16 22:39:21 +02:00
Laurenz 0ac2e86feb Add basic parsing benchmark 🌩 2020-08-14 19:54:49 +02:00
Laurenz dbfb3d2ced Formatting, documentation and small improvements 🧽 2020-08-03 16:04:55 +02:00
Laurenz cbbc46215f Layout elements and pure rust rendering 🥏 2020-08-02 21:17:42 +02:00
Laurenz d5ff97f42e Move binary into separate crate and tidy dependencies 🎭 2020-08-02 16:56:14 +02:00
Laurenz 2188ef6b89 Update Cargo.toml and CI configuration ⚙ 2020-08-02 11:58:47 +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 751812f451 Serialize layouts with serde 🔠 2020-02-04 21:36:29 +01:00
Laurenz ec60795575 Port tests 🚁 2020-02-03 15:05:34 +01:00
Laurenz 40ea35cbe7 Upgrade to new toddle interface 🐳 2020-02-03 10:37:50 +01:00
Laurenz 277f2d2176 ColorToken serialization + function fix 🚧 2020-01-18 15:58:36 +01:00
Laurenz 08b91a265f Powerful parser testing 🐱👤 2020-01-16 17:51:04 +01:00
Laurenz 15ad30555b Parser testing prototype 🥥 2020-01-14 20:17:50 +01:00
Laurenz 2ee5810fec Asyncify font loading 🪐 2020-01-06 12:41:42 +01:00
Laurenz f364395e1d Create parsing test harness 2019-12-07 14:42:25 +01:00
Laurenz f5b104d0da Rename crate `typst` -> `typstc` ✏ 2019-12-05 20:29:55 +01:00
Laurenz b4efae0883 Remove bad tests and tweak numbers for better debugging 🧪 2019-11-28 20:38:21 +01:00
Laurenz f2f05e07b0 Implement space extension (multipage) 2019-10-16 21:31:14 +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 19be053cc3 Create some benchmarks 📊 2019-07-28 21:03:33 +02:00
Laurenz e39a6efccf Deduplicate action lists ✂ 2019-06-21 22:12:36 +02:00
Laurenz 9d605c3128 Remove the concept of words from tokenization 🎈 2019-04-30 09:20:22 +02:00
Laurenz 90848df5de Create command line interface 💻 2019-04-29 17:25:23 +02:00
Laurenz a34d725000 Use interior mutability for font loader ⚙ 2019-04-01 12:00:37 +02:00
Laurenz 06101492dc Implement subsetting engine 🚀 2019-03-03 15:00:27 +01:00
Laurenz ae3af533ff Extract opentype parser into crate 🧱 2019-02-16 20:17:31 +01:00
Laurenz a562541fda Refactor pdf writer into modular crate 🧱 2019-02-13 18:32:42 +01:00
Laurenz 5a600eb354 Move crate into workspace subfolder 2019-02-12 21:31:35 +01:00