174 Commits

Author SHA1 Message Date
Laurenz
23d108c8e0 Font fallback 2022-04-03 13:55:58 +02:00
Laurenz
f2f473a81f Query cache 2022-02-23 17:17:00 +01:00
Laurenz
e1f29d6cb9 Rework the core context 2022-02-23 14:53:55 +01:00
Laurenz
2bf32c51bc Remove layout cache 2022-02-22 12:42:02 +01:00
Laurenz
9730e785a8 Tidy up 2022-02-07 14:19:13 +01:00
Martin Haug
fe70db1f4c New color stuff
- CMYK function
- More default colors
- Interpret RGB values as sRGB
2022-02-08 21:12:09 +01:00
Laurenz
20b1a38414 Switch from Rc to Arc 2022-01-31 16:47:00 +01:00
Laurenz
3739ab7720 Export into rendered images 2022-01-24 17:39:49 +01:00
Laurenz
f5dcb84e36 Make clippy a bit happier 2021-12-30 12:00:12 +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
Martin Haug
d971ac9a8c Add a producer info for the PDF 2021-12-02 17:24:52 +01:00
Laurenz
3a15922d2f X/Y abstractions 2021-11-26 16:32:06 +01:00
Laurenz
304d9dd110 Small style changes 2021-11-24 17:00:10 +01:00
Laurenz
8a88f71cb1 Transformations 2021-11-23 22:04:08 +01:00
Laurenz
0a974d86ba Welcome to Tigerland 2021-11-22 15:26:56 +01:00
Laurenz
cef46e6c40 Strokes 2021-11-20 15:51:07 +01:00
Laurenz
9a800daa82 Image fit modes 2021-11-16 21:32:29 +01:00
Laurenz
0e0f340502 Revert page and inline levels 2021-11-16 10:41:30 +01:00
Laurenz
63c274e7f6 Make clippy happier and remove Str 2021-11-15 17:06:43 +01:00
Laurenz
5b344b663a Reorganize modules
Instead of separating functionality into layout and library, everything lives in the library now. This way, related things live side by side and there are no duplicate file names in the two directories.
2021-10-31 15:52:35 +01:00
Laurenz
d4cc8c775d Move paint and colors into geom 2021-10-10 20:26:58 +02:00
Laurenz
c18321a4c2 Bugfix and tidying 2021-09-15 13:05:00 +02:00
Laurenz
d2618acd8d Bump pdf-writer 2021-09-09 12:16:55 +02:00
Laurenz
411aba5b6f Subset CFF subrs referenced by FD array 2021-08-29 14:46:51 +02:00
Laurenz
d101612414 Primitive CFF1 subsetting
The subsetting strategy is somewhat crazy for now: Simply zero the glyph data for all unused glyphs. While the CFF table itself doesn't shrink, the actual embedded font is compressed and greatly benefits from the repeated zeros.

This already compresses the fonts a lot (~90% for NotoSerifCJK), but they are still quite large.

Therefore, the plan of action:
- First, find more data that can be zeroed out.
- Then _maybe_ see whether we can instead properly rebuild the subsetted font.
2021-08-28 23:53:46 +02:00
Laurenz
73b63ffb99 Refactor subsetter
- Gracefully handle failed subsetting of one table
- Remove need for creating a ttf-parser face
2021-08-27 14:11:49 +02:00
Laurenz
dff2175558 Subset post table 2021-08-27 14:08:32 +02:00
Laurenz
0471e51bc4 Compress all PDF streams 2021-08-25 13:45:49 +02:00
Laurenz
f2882bf854 Support decoding of mac roman names
This allows discovery of Apple fonts without unicode name entries.
2021-08-25 13:24:30 +02:00
Laurenz
821536b253 Subset glyf and loca tables 2021-08-25 12:12:47 +02:00
Laurenz
6f84cf3c22 Basic subsetting architecture
Constructs a brand new font file where only necessary tables are contained.
2021-08-24 23:43:51 +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
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