Commit Graph

101 Commits

Author SHA1 Message Date
Ana Gelez 29af23663d
Support negative dimensions in rectangles (#3807) 2024-04-02 12:17:10 +00:00
Eric Biedert 72c5b42a30
Fix patterns with spacing in PDF (#3793) 2024-04-01 20:37:05 +00:00
frozolotl 0a917aba98
Fix warnings introduced by rust 1.77 (#3754) 2024-03-22 12:35:02 +00:00
Laurenz faca50a240
Final touches (#3678) 2024-03-15 14:47:41 +00:00
Laurenz a2d097686f
Update changelog and roadmap (#3594) 2024-03-09 16:56:56 +00:00
Wenzhuo Liu d927974bb1
fix leaky pdf text stroke (#3580)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-03-09 12:18:42 +00:00
Laurenz 82617a6a3c
Generate PDF ID automatically unless we really have a stable ID (#3591) 2024-03-09 11:55:03 +00:00
Laurenz aace521b56
Bump our crates (#3573) 2024-03-07 16:37:22 +00:00
tingerrr 5a03c818c8
Add `depth` and `offset` field to `heading` (#3038)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-02-29 08:51:56 +00:00
Laurenz 8d63b0479c
Make use of `is_some_and` where applicable (#3523) 2024-02-28 14:24:50 +00:00
Laurenz e16d3f5a67
Externalize assets (#3515) 2024-02-28 10:06:54 +00:00
Ilia ffd57bf56b
Sort languages when writing XMP metadata for reproducible builds (#3469) 2024-02-23 14:14:07 +00:00
Y.D.X 72d324c5b4
`/Last` in PDF should refer to the last _immediate_ children (#3447) 2024-02-20 13:15:42 +00:00
Y.D.X 394864fd4a
fix: `ToUnicode` in PDF should describe CID instead of GID (#3435) 2024-02-17 12:42:00 +00:00
Laurenz 79e37ccbac
Don't round SVG size (#3415) 2024-02-14 15:07:38 +00:00
Laurenz 601118652d
Share resource dictionary via indirect object instead of inheritance (#3414) 2024-02-14 14:41:46 +00:00
Laurenz 52571dd9ef
Fix named destinations (#3411) 2024-02-14 11:39:55 +00:00
Heinenen f776f0a75f
Named destinations (#2954) 2024-02-12 12:57:31 +00:00
Laurenz Stampfl 11abc1f1e3
Fix PDF export of grayscale image (#3219) 2024-01-25 15:12:31 +00:00
Laurenz 6ac71eeaf7 Add `Page` struct
To get rid of the Meta hack where numbering and things like that are stored in the frame.
2024-01-17 21:53:20 +01:00
Laurenz 7cb257a1ac More consistent naming 2024-01-16 14:52:50 +01:00
Laurenz c2dfbd39a0
Migrate metadata fields out of individual elements (#3200) 2024-01-16 09:24:36 +00:00
Sébastien d'Herbais de Thun 712eaaa5f4
Fix CMYK on gradients (#3142) 2024-01-08 15:53:22 +00:00
Sébastien d'Herbais de Thun c4d9b0c3d8
New performance timings (#3096)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2023-12-30 12:36:15 +00:00
Laurenz 67ead94cc2 Fix naming inconsistency for strokes 2023-12-28 13:52:58 +01:00
Martin Haug 3dc4eb6bcd Write annotation flags 2023-12-19 22:45:41 +01:00
Wenzhuo Liu 81ff34d80d
Add stroke for text (#2970) 2023-12-19 10:36:18 +01:00
Sébastien d'Herbais de Thun 08225e42d8
Parallel export (#2989) 2023-12-18 12:32:53 +01:00
Eric Biedert f3c39ac84a
Fix pattern offset in PDF (#2985) 2023-12-18 12:30:26 +01:00
Sébastien d'Herbais de Thun d869a07d2d
Remove HSV and HSL color spaces from PDF export (#2927)
Co-authored-by: EpicEricEE <github@ericbiedert.de>
2023-12-13 14:35:56 +01:00
Sébastien d'Herbais de Thun 343a423e9f
Fix #2902 (#2913) 2023-12-11 17:03:59 +01:00
Sébastien d'Herbais de Thun f5c90c8714
Fix PDF transform (#2850) 2023-12-04 14:24:05 +01:00
Sébastien d'Herbais de Thun 5bdec9e1d8
Optimized labels & introspector (#2801)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2023-11-30 12:57:04 +01:00
Laurenz 3c22c9f319 Pattern improvements 2023-11-29 16:28:30 +01:00
Laurenz af9d8727e1 Don't write multiple authors in XMP metadata
Fixes #2556.
2023-11-29 11:53:09 +01:00
Laurenz 713cde1136 Make workspace inheriting consistent 2023-11-27 16:54:55 +01:00
danieleades e36a18b991
Use clippy workspace lints and inline format args (#2771) 2023-11-27 11:34:14 +01:00
Sébastien d'Herbais de Thun 1756718bab
Gradient Part 6 - Pattern fills (#2740) 2023-11-24 15:46:20 +01:00
Laurenz 7eebafa783 Merge `typst` and `typst-library` 2023-11-24 12:30:02 +01:00
Laurenz 36c7301608 Tidy up some imports 2023-11-21 15:20:49 +01:00
frozolotl 8e5b7fe5c1
Clean up some color quantization code (#2730) 2023-11-21 10:24:39 +01:00
Sébastien d'Herbais de Thun 96f02960a2
Fix gradient colors (#2719) 2023-11-20 18:20:26 +01:00
Laurenz 2da619e17c Streamline imports 2023-11-19 16:34:38 +01:00
Sébastien d'Herbais de Thun f5b3af3c1b
Parallel image encoding (#2693) 2023-11-17 19:42:49 +01:00
frozolotl b0e81d4b3f
Remove restrictions to chroma and improve clamping (#2690)
This PR does a few small things:
- Oklab's a*/b* and Oklch's chroma components can be as large as desired.
- In PDF, when encoding Oklab, the range is widened from [-0.4,0.4] to [-0.5,0.5].
- In PDF, clamping is now performed on Oklch's chroma instead of a* and b*.
  This causes hue not to be distorted when clamping.

SVG and PNG export remain unchanged:
- SVG itself never had any restrictions on chroma.
  We directly use the `oklab` and `oklch` CSS colors, which should work fine for the most part.
  In the future, embedded ICC profiles might be nice. Further research is likely necessary.
- While PNG does not support color spaces like Oklab or Oklch, certain useful features exist.
  One can define gamma (gAMA) and chromacities&whitepoint (cHRM) chunks and even embed ICC profiles.
  While `image` crate does not support these features for encoding, its backend crate `png` does support gAMA and cHRM.
  It does not allow embedding ICC profiles yet, though.

As it stands, to fully support wide gamuts and more accurate colors, more work is necessary.
This PR should help a bit though.
2023-11-17 10:41:45 +01:00
frozolotl f56813a778
Remove `a` suffix from Rgba and LinearRgba (#2691) 2023-11-15 14:48:48 +01:00
frozolotl d93ed1b3d8
Implement Oklch support (#2611) 2023-11-10 10:31:06 +01:00
Laurenz 7f0fcda376 Move some things out of `util` 2023-11-08 23:42:45 +01:00
Sébastien d'Herbais de Thun d7fea7077e
Gradient Part 5c: Fix gradient rotation on text & math (#2606) 2023-11-08 15:51:25 +01:00
Laurenz ccbe901cb7 Make `PdfContext` private again 2023-11-08 15:35:05 +01:00
Laurenz 46846a337e Extract `typst-pdf` crate 2023-11-08 15:09:55 +01:00