MuPDF X.Y.Z

fitz/config.h

Index

macro

Config

Compile-time build configuration with C preprocessor defines.

Spot rendering

Enable the following for spot (and hence overprint/overprint simulation) capable rendering. This forces FZ_PLOTTERS_N on.

#define FZ_ENABLE_SPOT_RENDERING 1

Plotters

Choose which plotters we need. By default we build all the plotters in. To avoid building plotters in that aren’t needed, define the unwanted FZ_PLOTTERS_… define to 0.

#define FZ_PLOTTERS_G 1

#define FZ_PLOTTERS_RGB 1

#define FZ_PLOTTERS_CMYK 1

#define FZ_PLOTTERS_N 1

Document agents

Choose which document agents to include. By default all are enabled. To avoid building unwanted ones, define FZ_ENABLE_… to 0.

#define FZ_ENABLE_PDF 1

#define FZ_ENABLE_XPS 1

#define FZ_ENABLE_SVG 1

#define FZ_ENABLE_CBZ 1

#define FZ_ENABLE_IMG 1

#define FZ_ENABLE_HTML 1

#define FZ_ENABLE_FB2 1

#define FZ_ENABLE_MOBI 1

#define FZ_ENABLE_EPUB 1

#define FZ_ENABLE_OFFICE 1

#define FZ_ENABLE_TXT 1

Some of those document agents rely on the HTML engine. This will be enabled if required based upon those engines, but can be enabled independently of them so that other features (such as the fz_story mechanism or PDF Annotation rich content) can work.

#define FZ_ENABLE_HTML_ENGINE 1

Document writers

Choose which document writers to include. By default all are enabled. To avoid building unwanted ones, define FZ_ENABLE_…_OUTPUT to 0.

#define FZ_ENABLE_OCR_OUTPUT 1

#define FZ_ENABLE_DOCX_OUTPUT 1

#define FZ_ENABLE_ODT_OUTPUT 1

Color management

Choose whether to enable ICC color profiles.

#define FZ_ENABLE_ICC 1

Optional features

Choose whether to enable JPEG2000 decoding. By default, it is enabled, but due to frequent security issues with the third party libraries we support disabling it with this flag.

#define FZ_ENABLE_JPX 1

Choose whether to enable Brotli compression support. By default, it is enabled.

#define FZ_ENABLE_BROTLI 1

Choose whether to enable JavaScript. By default JavaScript is enabled both for mutool and PDF interactivity.

#define FZ_ENABLE_JS 1

Choose whether to enable barcode functionality. It is enabled by default, unless disabled by the build system.

#define FZ_ENABLE_BARCODE 1

Choose which hyphenation patterns to include.

Include core hyphenation patterns (bn, de, en, es, fr, gu, hi, it, kn, mr, pt, ru, ta, te, th, tr).

#define FZ_ENABLE_HYPHEN 1

Include core + extra hyphenation patterns.

#define FZ_ENABLE_HYPHEN_ALL 1

Embedded fonts

Choose which fonts to include. By default we include the base 14 PDF fonts, DroidSansFallback from Android for CJK, and Charis SIL from SIL for epub/html. Enable the following defines to AVOID including unwanted fonts.

To avoid all noto fonts except CJK, enable:

#define TOFU

To skip the CJK font, enable: (this implicitly enables TOFU_CJK_EXT and TOFU_CJK_LANG)

#define TOFU_CJK

To skip CJK Extension A, enable: (this implicitly enables TOFU_CJK_LANG)

#define TOFU_CJK_EXT

To skip CJK language specific fonts, enable:

#define TOFU_CJK_LANG

To skip the Emoji font, enable:

#define TOFU_EMOJI

To skip the ancient/historic scripts, enable:

#define TOFU_HISTORIC

To skip the symbol font, enable:

#define TOFU_SYMBOL

To skip the SIL fonts, enable:

#define TOFU_SIL

To skip the Base14 fonts, enable:

#define TOFU_BASE14

(You probably really don’t want to do that except for measurement purposes!)

Default configuration defines

macro FZ_ENABLE_SPOT_RENDERING

#define FZ_ENABLE_SPOT_RENDERING 1

macro FZ_PLOTTERS_N

#define FZ_PLOTTERS_N 1

macro FZ_PLOTTERS_G

#define FZ_PLOTTERS_G 1

macro FZ_PLOTTERS_RGB

#define FZ_PLOTTERS_RGB 1

macro FZ_PLOTTERS_CMYK

#define FZ_PLOTTERS_CMYK 1

macro FZ_PLOTTERS_N

#define FZ_PLOTTERS_N 1

We need at least 1 plotter defined

macro FZ_ENABLE_HYPHEN

#define FZ_ENABLE_HYPHEN 1

macro FZ_ENABLE_HYPHEN_ALL

#define FZ_ENABLE_HYPHEN_ALL 1

macro FZ_ENABLE_PDF

#define FZ_ENABLE_PDF 1

macro FZ_ENABLE_XPS

#define FZ_ENABLE_XPS 1

macro FZ_ENABLE_SVG

#define FZ_ENABLE_SVG 1

macro FZ_ENABLE_CBZ

#define FZ_ENABLE_CBZ 1

macro FZ_ENABLE_IMG

#define FZ_ENABLE_IMG 1

macro FZ_ENABLE_HTML

#define FZ_ENABLE_HTML 1

macro FZ_ENABLE_MD

#define FZ_ENABLE_MD 1

macro FZ_ENABLE_EPUB

#define FZ_ENABLE_EPUB 1

macro FZ_ENABLE_FB2

#define FZ_ENABLE_FB2 1

macro FZ_ENABLE_MOBI

#define FZ_ENABLE_MOBI 1

macro FZ_ENABLE_TXT

#define FZ_ENABLE_TXT 1

macro FZ_ENABLE_OFFICE

#define FZ_ENABLE_OFFICE 1

macro FZ_ENABLE_OCR_OUTPUT

#define FZ_ENABLE_OCR_OUTPUT 1

macro FZ_ENABLE_ODT_OUTPUT

#define FZ_ENABLE_ODT_OUTPUT 1

macro FZ_ENABLE_DOCX_OUTPUT

#define FZ_ENABLE_DOCX_OUTPUT 1

macro FZ_ENABLE_JPX

#define FZ_ENABLE_JPX 1

macro FZ_ENABLE_BROTLI

#define FZ_ENABLE_BROTLI 1

macro FZ_ENABLE_JS

#define FZ_ENABLE_JS 1

macro FZ_ENABLE_ICC

#define FZ_ENABLE_ICC 1

macro FZ_ENABLE_HTML_ENGINE

#define FZ_ENABLE_HTML_ENGINE 1

macro TOFU_SIL

#define TOFU_SIL

If Epub and HTML are both disabled, disable SIL fonts

macro OCR_DISABLED

#define OCR_DISABLED

macro FZ_ENABLE_BARCODE

#define FZ_ENABLE_BARCODE 1