ladybird/Meta/CMake
Nico Weber 9c762b9650 LibPDF+Meta: Use a CMYK ICC profile to convert CMYK to RGB
CMYK data describes which inks a printer should use to print a color.
If a screen should display a color that's supposed to look similar
to what the printer produces, it results in a color very different
to what Color::from_cmyk() produces. (It's also printer-dependent.)

There are many ICC profiles describing printing processes. It doesn't
matter too much which one we use -- most of them look somewhat
similar, and they all look dramatically better than Color::from_cmyk().

This patch adds a function to download a zip file that Adobe offers
on their web site. They even have a page for redistribution:
https://www.adobe.com/support/downloads/iccprofiles/icc_eula_win_dist.html

(That one leads to a broken download though, so this downloads the
end-user version.)

In case we have to move off this download at some point, there are also
a whole bunch of profiles at https://www.color.org/registry/index.xalter
that "may be used, embedded, exchanged, and shared without restriction".

The adobe zip contains a whole bunch of other useful and fun profiles,
so I went with it.

For now, this only unzips the USWebCoatedSWOP.icc file though, and
installs it in ${CMAKE_BINARY_DIR}/Root/res/icc/Adobe/CMYK/. In
Serenity builds, this will make it to /res/icc/Adobe/CMYK in the
disk image. And in lagom build, after #23016 this is the
lagom res staging directory that tools can install via
Core::ResourceImplementation. `pdf` and `MacPDF` already do that,
`TestPDF` now does it too.

The final piece is that LibPDF then loads the profile from there
and uses it for DeviceCMYK color conversions.

(Doing file access from the bowels of a library is a bit weird,
especially in a system that has sandboxing built in. But LibGfx does
that in FontDatabase too already, and LibPDF uses that, so it's not a
new problem.)
2024-02-01 13:42:04 -07:00
..
Superbuild Meta: Remove some obsolete cmake version checks 2024-01-29 20:09:12 -05:00
accelerated_graphics.cmake Meta: Silence warnings from optional CMake packages 2023-11-28 06:54:16 -05:00
all_the_debug_macros.cmake AK+LibIDL: Put IDL dbgln statement behind a debug flag 2023-11-15 23:42:53 +01:00
ca_certificates_data.cmake Meta: Update cacert.pem to 2023-12-12 2023-12-14 08:36:25 -07:00
check_for_dependencies.cmake Meta: Remove some obsolete cmake version checks 2024-01-29 20:09:12 -05:00
cmake-version.cmake Toolchain+Meta: Add script to build CMake from source 2022-12-13 11:36:14 +01:00
code_generators.cmake CMake: Query Python interpreter with find_package 2023-12-20 12:54:08 -07:00
common_compile_options.cmake CMake: Set CMAKE_COLOR_DIAGNOSTICS to ON for colored diagnostics 2024-01-18 13:59:35 +01:00
common_options.cmake LibPDF+Meta: Use a CMYK ICC profile to convert CMYK to RGB 2024-02-01 13:42:04 -07:00
commonmark_spec.cmake Meta: Download commonmark.spec.json to the cache directory 2023-09-14 08:05:00 +01:00
download_icc_profiles.cmake LibPDF+Meta: Use a CMYK ICC profile to convert CMYK to RGB 2024-02-01 13:42:04 -07:00
flac_spec_tests.cmake Meta: Remove extract_tar_path() function 2024-01-29 22:03:27 -05:00
jakt.cmake Meta: Update jakt build support for fully bootstrapped compiler 2022-09-09 11:23:42 +02:00
lagom-install-config.cmake Meta: Update jakt build support for fully bootstrapped compiler 2022-09-09 11:23:42 +02:00
lagom_compile_options.cmake Meta: Support -DCMAKE_BUILD_TYPE=DEBUG for Lagom builds 2023-12-21 19:03:40 +01:00
lagom_install_options.cmake CMake: Don't try to enable install options if no languages are enabled 2023-12-11 11:03:32 -07:00
lagom_options.cmake Meta: Link Lagom with LLD by default and allow configuring the linker 2023-09-05 14:50:36 +02:00
libgl_generators.cmake CMake: Don't require to install glapi.h to system 2023-02-04 15:53:07 -07:00
libweb_generators.cmake LibWeb: Install generated CSS/PseudoClass.h file the same as the others 2023-10-11 12:35:35 -04:00
locale_data.cmake LibLocale: Update to CLDR version 44.1.0 2023-12-23 20:05:36 +01:00
pnp_ids.cmake LibEDID: Replace the HTML-based PNP ID parser with a CSV-based parser 2023-11-08 08:19:04 +01:00
processor-count.cmake Meta: Print error if cmake does not exist 2022-10-16 17:49:18 +02:00
public_suffix.cmake LibPublicSuffix: Add Library and Generators 2023-08-17 15:30:23 +01:00
serenity_compile_options.cmake Meta: Disable -Wcast-align warning on RISC-V 2023-12-14 09:02:15 -07:00
serenity_components.cmake Meta: Properly ignore targets which don't have a component name 2022-10-15 13:12:42 +02:00
serenity_options.cmake CMake: Pass NO_POLICY_SCOPE to options cmake helpers 2022-12-14 12:43:12 +01:00
setup_ccache.cmake Meta: Detect ccache being passed as the compiler 2022-12-12 21:34:09 -07:00
time_zone_data.cmake Meta: Use extract_path() in extract_tzdb_file() 2024-01-29 22:03:27 -05:00
unicode_data.cmake CMake: Don't download IDNA files when ENABLE_NETWORK_DOWNLOAD is OFF 2023-12-13 10:51:27 -07:00
use_linker.cmake CMake: Actually set the LAGOM_USE_LINKER option automatically 2023-10-11 15:02:42 -04:00
utils.cmake Meta: Remove extract_tar_path() function 2024-01-29 22:03:27 -05:00
wasm_spec_tests.cmake Meta: Remove extract_tar_path() function 2024-01-29 22:03:27 -05:00