33 Commits

Author SHA1 Message Date
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