mupdf
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1// Copyright (C) 2004-2025 Artifex Software, Inc.
2//
3// This file is part of MuPDF.
4//
5// MuPDF is free software: you can redistribute it and/or modify it under the
6// terms of the GNU Affero General Public License as published by the Free
7// Software Foundation, either version 3 of the License, or (at your option)
8// any later version.
9//
10// MuPDF is distributed in the hope that it will be useful, but WITHOUT ANY
11// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12// FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
13// details.
14//
15// You should have received a copy of the GNU Affero General Public License
16// along with MuPDF. If not, see <https://www.gnu.org/licenses/agpl-3.0.en.html>
17//
18// Alternative licensing terms are available from the licensor.
19// For commercial licensing, see <https://www.artifex.com/> or contact
20// Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco,
21// CA 94129, USA, for further information.
22
23#ifndef FZ_CONFIG_H
24
25#define FZ_CONFIG_H
26
31/* #define FZ_ENABLE_SPOT_RENDERING 1 */
32
39/* #define FZ_PLOTTERS_G 1 */
40/* #define FZ_PLOTTERS_RGB 1 */
41/* #define FZ_PLOTTERS_CMYK 1 */
42/* #define FZ_PLOTTERS_N 1 */
43
49/* #define FZ_ENABLE_PDF 1 */
50/* #define FZ_ENABLE_XPS 1 */
51/* #define FZ_ENABLE_SVG 1 */
52/* #define FZ_ENABLE_CBZ 1 */
53/* #define FZ_ENABLE_IMG 1 */
54/* #define FZ_ENABLE_HTML 1 */
55/* #define FZ_ENABLE_FB2 1 */
56/* #define FZ_ENABLE_MOBI 1 */
57/* #define FZ_ENABLE_EPUB 1 */
58/* #define FZ_ENABLE_OFFICE 1 */
59/* #define FZ_ENABLE_TXT 1 */
60
68/* #define FZ_ENABLE_HTML_ENGINE 1 */
69
75/* #define FZ_ENABLE_OCR_OUTPUT 1 */
76/* #define FZ_ENABLE_DOCX_OUTPUT 1 */
77/* #define FZ_ENABLE_ODT_OUTPUT 1 */
78
82/* #define FZ_ENABLE_ICC 1 */
83
90/* #define FZ_ENABLE_JPX 1 */
91
96/* #define FZ_ENABLE_BROTLI 1 */
97
103/* #define FZ_ENABLE_JS 1 */
104
110/* #define FZ_ENABLE_BARCODE 1 */
111
120/* To avoid all noto fonts except CJK, enable: */
121/* #define TOFU */
122
123/* To skip the CJK font, enable: (this implicitly enables TOFU_CJK_EXT
124 * and TOFU_CJK_LANG) */
125/* #define TOFU_CJK */
126
127/* To skip CJK Extension A, enable: (this implicitly enables
128 * TOFU_CJK_LANG) */
129/* #define TOFU_CJK_EXT */
130
131/* To skip CJK language specific fonts, enable: */
132/* #define TOFU_CJK_LANG */
133
134/* To skip the Emoji font, enable: */
135/* #define TOFU_EMOJI */
136
137/* To skip the ancient/historic scripts, enable: */
138/* #define TOFU_HISTORIC */
139
140/* To skip the symbol font, enable: */
141/* #define TOFU_SYMBOL */
142
143/* To skip the SIL fonts, enable: */
144/* #define TOFU_SIL */
145
146/* To skip the Base14 fonts, enable: */
147/* #define TOFU_BASE14 */
148/* (You probably really don't want to do that except for measurement
149 * purposes!) */
150
151/* Choose which hyphenation patterns to include. */
152/* #define FZ_ENABLE_HYPHEN 1 */
153/* #define FZ_ENABLE_HYPHEN_ALL 1 */
154
155/* ---------- DO NOT EDIT ANYTHING UNDER THIS LINE ---------- */
156
157#ifndef FZ_ENABLE_SPOT_RENDERING
158#define FZ_ENABLE_SPOT_RENDERING 1
159#endif
160
161#if FZ_ENABLE_SPOT_RENDERING
162#undef FZ_PLOTTERS_N
163#define FZ_PLOTTERS_N 1
164#endif /* FZ_ENABLE_SPOT_RENDERING */
165
166#ifndef FZ_PLOTTERS_G
167#define FZ_PLOTTERS_G 1
168#endif /* FZ_PLOTTERS_G */
169
170#ifndef FZ_PLOTTERS_RGB
171#define FZ_PLOTTERS_RGB 1
172#endif /* FZ_PLOTTERS_RGB */
173
174#ifndef FZ_PLOTTERS_CMYK
175#define FZ_PLOTTERS_CMYK 1
176#endif /* FZ_PLOTTERS_CMYK */
177
178#ifndef FZ_PLOTTERS_N
179#define FZ_PLOTTERS_N 1
180#endif /* FZ_PLOTTERS_N */
181
182/* We need at least 1 plotter defined */
183#if FZ_PLOTTERS_G == 0 && FZ_PLOTTERS_RGB == 0 && FZ_PLOTTERS_CMYK == 0
184#undef FZ_PLOTTERS_N
185#define FZ_PLOTTERS_N 1
186#endif
187
188#ifndef FZ_ENABLE_HYPHEN
189#define FZ_ENABLE_HYPHEN 1
190#endif /* FZ_ENABLE_HYPHEN */
191
192#ifndef FZ_ENABLE_HYPHEN_ALL
193#define FZ_ENABLE_HYPHEN_ALL 1
194#endif /* FZ_ENABLE_HYPHEN_ALL */
195
196#ifndef FZ_ENABLE_PDF
197#define FZ_ENABLE_PDF 1
198#endif /* FZ_ENABLE_PDF */
199
200#ifndef FZ_ENABLE_XPS
201#define FZ_ENABLE_XPS 1
202#endif /* FZ_ENABLE_XPS */
203
204#ifndef FZ_ENABLE_SVG
205#define FZ_ENABLE_SVG 1
206#endif /* FZ_ENABLE_SVG */
207
208#ifndef FZ_ENABLE_CBZ
209#define FZ_ENABLE_CBZ 1
210#endif /* FZ_ENABLE_CBZ */
211
212#ifndef FZ_ENABLE_IMG
213#define FZ_ENABLE_IMG 1
214#endif /* FZ_ENABLE_IMG */
215
216#ifndef FZ_ENABLE_HTML
217#define FZ_ENABLE_HTML 1
218#endif /* FZ_ENABLE_HTML */
219
220#ifndef FZ_ENABLE_MD
221#define FZ_ENABLE_MD 1
222#endif /* FZ_ENABLE_MD */
223
224#ifndef FZ_ENABLE_EPUB
225#define FZ_ENABLE_EPUB 1
226#endif /* FZ_ENABLE_EPUB */
227
228#ifndef FZ_ENABLE_FB2
229#define FZ_ENABLE_FB2 1
230#endif /* FZ_ENABLE_FB2 */
231
232#ifndef FZ_ENABLE_MOBI
233#define FZ_ENABLE_MOBI 1
234#endif /* FZ_ENABLE_MOBI */
235
236#ifndef FZ_ENABLE_TXT
237#define FZ_ENABLE_TXT 1
238#endif /* FZ_ENABLE_TXT */
239
240#ifndef FZ_ENABLE_OFFICE
241#define FZ_ENABLE_OFFICE 1
242#endif /* FZ_ENABLE_OFFICE */
243
244#ifndef FZ_ENABLE_OCR_OUTPUT
245#define FZ_ENABLE_OCR_OUTPUT 1
246#endif /* FZ_ENABLE_OCR_OUTPUT */
247
248#ifndef FZ_ENABLE_ODT_OUTPUT
249#define FZ_ENABLE_ODT_OUTPUT 1
250#endif /* FZ_ENABLE_ODT_OUTPUT */
251
252#ifndef FZ_ENABLE_DOCX_OUTPUT
253#define FZ_ENABLE_DOCX_OUTPUT 1
254#endif /* FZ_ENABLE_DOCX_OUTPUT */
255
256#ifndef FZ_ENABLE_JPX
257#define FZ_ENABLE_JPX 1
258#endif /* FZ_ENABLE_JPX */
259
260#ifndef FZ_ENABLE_BROTLI
261#define FZ_ENABLE_BROTLI 1
262#endif /* FZ_ENABLE_BROTLI */
263
264#ifndef FZ_ENABLE_JS
265#define FZ_ENABLE_JS 1
266#endif /* FZ_ENABLE_JS */
267
268#ifndef FZ_ENABLE_ICC
269#define FZ_ENABLE_ICC 1
270#endif /* FZ_ENABLE_ICC */
271
272#ifdef FZ_ENABLE_HTML_ENGINE
273#if FZ_ENABLE_HTML_ENGINE == 0
274#if FZ_ENABLE_HTML == 1
275#error FZ_ENABLE_HTML cannot work without FZ_ENABLE_HTML_ENGINE
276#endif
277#if FZ_ENABLE_EPUB == 1
278#error FZ_ENABLE_EPUB cannot work without FZ_ENABLE_HTML_ENGINE
279#endif
280#if FZ_ENABLE_MOBI == 1
281#error FZ_ENABLE_MOBI cannot work without FZ_ENABLE_HTML_ENGINE
282#endif
283#if FZ_ENABLE_FB2 == 1
284#error FZ_ENABLE_FB2 cannot work without FZ_ENABLE_HTML_ENGINE
285#endif
286#if FZ_ENABLE_TXT == 1
287#error FZ_ENABLE_TXT cannot work without FZ_ENABLE_HTML_ENGINE
288#endif
289#if FZ_ENABLE_OFFICE == 1
290#error FZ_ENABLE_OFFICE cannot work without FZ_ENABLE_HTML_ENGINE
291#endif
292#if FZ_ENABLE_MD == 1
293#error FZ_ENABLE_MD cannot work without FZ_ENABLE_HTML_ENGINE
294#endif
295#endif
296#else
297#if FZ_ENABLE_HTML || FZ_ENABLE_EPUB || FZ_ENABLE_MOBI || FZ_ENABLE_FB2 || FZ_ENABLE_TXT || FZ_ENABLE_OFFICE || FZ_ENABLE_MD
298#define FZ_ENABLE_HTML_ENGINE 1
299#else
300#define FZ_ENABLE_HTML_ENGINE 0
301#endif
302#endif
303
304/* If Epub and HTML are both disabled, disable SIL fonts */
305#if FZ_ENABLE_HTML == 0 && FZ_ENABLE_EPUB == 0
306#undef TOFU_SIL
307#define TOFU_SIL
308#endif
309
310#if FZ_ENABLE_HTML_ENGINE == 0
311#undef FZ_ENABLE_HYPHEN
312#define FZ_ENABLE_HYPHEN 0
313#endif
314
315#if !defined(HAVE_LEPTONICA) || !defined(HAVE_TESSERACT)
316#ifndef OCR_DISABLED
317#define OCR_DISABLED
318#endif
319#endif
320
321#if !defined(FZ_ENABLE_BARCODE)
322#define FZ_ENABLE_BARCODE 1
323#endif
324
325#endif /* FZ_CONFIG_H */