Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/include/mupdf/fitz/config.h @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 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 | |
| 27 /** | |
| 28 Enable the following for spot (and hence overprint/overprint | |
| 29 simulation) capable rendering. This forces FZ_PLOTTERS_N on. | |
| 30 */ | |
| 31 /* #define FZ_ENABLE_SPOT_RENDERING 1 */ | |
| 32 | |
| 33 /** | |
| 34 Choose which plotters we need. | |
| 35 By default we build all the plotters in. To avoid building | |
| 36 plotters in that aren't needed, define the unwanted | |
| 37 FZ_PLOTTERS_... define to 0. | |
| 38 */ | |
| 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 | |
| 44 /** | |
| 45 Choose which document agents to include. | |
| 46 By default all are enabled. To avoid building unwanted | |
| 47 ones, define FZ_ENABLE_... to 0. | |
| 48 */ | |
| 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 | |
| 61 /** | |
| 62 Some of those document agents rely on the HTML | |
| 63 engine. This will be enabled if required based upon | |
| 64 those engines, but can be enabled independently of | |
| 65 them so that other features (such as the fz_story | |
| 66 mechanism or PDF Annotation rich content) can work. | |
| 67 */ | |
| 68 /* #define FZ_ENABLE_HTML_ENGINE 1 */ | |
| 69 | |
| 70 /** | |
| 71 Choose which document writers to include. | |
| 72 By default all are enabled. To avoid building unwanted | |
| 73 ones, define FZ_ENABLE_..._OUTPUT to 0. | |
| 74 */ | |
| 75 /* #define FZ_ENABLE_OCR_OUTPUT 1 */ | |
| 76 /* #define FZ_ENABLE_DOCX_OUTPUT 1 */ | |
| 77 /* #define FZ_ENABLE_ODT_OUTPUT 1 */ | |
| 78 | |
| 79 /** | |
| 80 Choose whether to enable ICC color profiles. | |
| 81 */ | |
| 82 /* #define FZ_ENABLE_ICC 1 */ | |
| 83 | |
| 84 /** | |
| 85 Choose whether to enable JPEG2000 decoding. | |
| 86 By default, it is enabled, but due to frequent security | |
| 87 issues with the third party libraries we support disabling | |
| 88 it with this flag. | |
| 89 */ | |
| 90 /* #define FZ_ENABLE_JPX 1 */ | |
| 91 | |
| 92 /** | |
| 93 Choose whether to enable Brotli compression support. | |
| 94 By default, it is enabled. | |
| 95 */ | |
| 96 /* #define FZ_ENABLE_BROTLI 1 */ | |
| 97 | |
| 98 /** | |
| 99 Choose whether to enable JavaScript. | |
| 100 By default JavaScript is enabled both for mutool and PDF | |
| 101 interactivity. | |
| 102 */ | |
| 103 /* #define FZ_ENABLE_JS 1 */ | |
| 104 | |
| 105 /** | |
| 106 Choose whether to enable barcode functionality. | |
| 107 It is enabled by default, unless disabled by the build | |
| 108 system. | |
| 109 */ | |
| 110 /* #define FZ_ENABLE_BARCODE 1 */ | |
| 111 | |
| 112 /** | |
| 113 Choose which fonts to include. | |
| 114 By default we include the base 14 PDF fonts, | |
| 115 DroidSansFallback from Android for CJK, and | |
| 116 Charis SIL from SIL for epub/html. | |
| 117 Enable the following defines to AVOID including | |
| 118 unwanted fonts. | |
| 119 */ | |
| 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 /* ---------- DO NOT EDIT ANYTHING UNDER THIS LINE ---------- */ | |
| 152 | |
| 153 #ifndef FZ_ENABLE_SPOT_RENDERING | |
| 154 #define FZ_ENABLE_SPOT_RENDERING 1 | |
| 155 #endif | |
| 156 | |
| 157 #if FZ_ENABLE_SPOT_RENDERING | |
| 158 #undef FZ_PLOTTERS_N | |
| 159 #define FZ_PLOTTERS_N 1 | |
| 160 #endif /* FZ_ENABLE_SPOT_RENDERING */ | |
| 161 | |
| 162 #ifndef FZ_PLOTTERS_G | |
| 163 #define FZ_PLOTTERS_G 1 | |
| 164 #endif /* FZ_PLOTTERS_G */ | |
| 165 | |
| 166 #ifndef FZ_PLOTTERS_RGB | |
| 167 #define FZ_PLOTTERS_RGB 1 | |
| 168 #endif /* FZ_PLOTTERS_RGB */ | |
| 169 | |
| 170 #ifndef FZ_PLOTTERS_CMYK | |
| 171 #define FZ_PLOTTERS_CMYK 1 | |
| 172 #endif /* FZ_PLOTTERS_CMYK */ | |
| 173 | |
| 174 #ifndef FZ_PLOTTERS_N | |
| 175 #define FZ_PLOTTERS_N 1 | |
| 176 #endif /* FZ_PLOTTERS_N */ | |
| 177 | |
| 178 /* We need at least 1 plotter defined */ | |
| 179 #if FZ_PLOTTERS_G == 0 && FZ_PLOTTERS_RGB == 0 && FZ_PLOTTERS_CMYK == 0 | |
| 180 #undef FZ_PLOTTERS_N | |
| 181 #define FZ_PLOTTERS_N 1 | |
| 182 #endif | |
| 183 | |
| 184 #ifndef FZ_ENABLE_PDF | |
| 185 #define FZ_ENABLE_PDF 1 | |
| 186 #endif /* FZ_ENABLE_PDF */ | |
| 187 | |
| 188 #ifndef FZ_ENABLE_XPS | |
| 189 #define FZ_ENABLE_XPS 1 | |
| 190 #endif /* FZ_ENABLE_XPS */ | |
| 191 | |
| 192 #ifndef FZ_ENABLE_SVG | |
| 193 #define FZ_ENABLE_SVG 1 | |
| 194 #endif /* FZ_ENABLE_SVG */ | |
| 195 | |
| 196 #ifndef FZ_ENABLE_CBZ | |
| 197 #define FZ_ENABLE_CBZ 1 | |
| 198 #endif /* FZ_ENABLE_CBZ */ | |
| 199 | |
| 200 #ifndef FZ_ENABLE_IMG | |
| 201 #define FZ_ENABLE_IMG 1 | |
| 202 #endif /* FZ_ENABLE_IMG */ | |
| 203 | |
| 204 #ifndef FZ_ENABLE_HTML | |
| 205 #define FZ_ENABLE_HTML 1 | |
| 206 #endif /* FZ_ENABLE_HTML */ | |
| 207 | |
| 208 #ifndef FZ_ENABLE_EPUB | |
| 209 #define FZ_ENABLE_EPUB 1 | |
| 210 #endif /* FZ_ENABLE_EPUB */ | |
| 211 | |
| 212 #ifndef FZ_ENABLE_FB2 | |
| 213 #define FZ_ENABLE_FB2 1 | |
| 214 #endif /* FZ_ENABLE_FB2 */ | |
| 215 | |
| 216 #ifndef FZ_ENABLE_MOBI | |
| 217 #define FZ_ENABLE_MOBI 1 | |
| 218 #endif /* FZ_ENABLE_MOBI */ | |
| 219 | |
| 220 #ifndef FZ_ENABLE_TXT | |
| 221 #define FZ_ENABLE_TXT 1 | |
| 222 #endif /* FZ_ENABLE_TXT */ | |
| 223 | |
| 224 #ifndef FZ_ENABLE_OFFICE | |
| 225 #define FZ_ENABLE_OFFICE 1 | |
| 226 #endif /* FZ_ENABLE_OFFICE */ | |
| 227 | |
| 228 #ifndef FZ_ENABLE_OCR_OUTPUT | |
| 229 #define FZ_ENABLE_OCR_OUTPUT 1 | |
| 230 #endif /* FZ_ENABLE_OCR_OUTPUT */ | |
| 231 | |
| 232 #ifndef FZ_ENABLE_ODT_OUTPUT | |
| 233 #define FZ_ENABLE_ODT_OUTPUT 1 | |
| 234 #endif /* FZ_ENABLE_ODT_OUTPUT */ | |
| 235 | |
| 236 #ifndef FZ_ENABLE_DOCX_OUTPUT | |
| 237 #define FZ_ENABLE_DOCX_OUTPUT 1 | |
| 238 #endif /* FZ_ENABLE_DOCX_OUTPUT */ | |
| 239 | |
| 240 #ifndef FZ_ENABLE_JPX | |
| 241 #define FZ_ENABLE_JPX 1 | |
| 242 #endif /* FZ_ENABLE_JPX */ | |
| 243 | |
| 244 #ifndef FZ_ENABLE_BROTLI | |
| 245 #define FZ_ENABLE_BROTLI 1 | |
| 246 #endif /* FZ_ENABLE_BROTLI */ | |
| 247 | |
| 248 #ifndef FZ_ENABLE_JS | |
| 249 #define FZ_ENABLE_JS 1 | |
| 250 #endif /* FZ_ENABLE_JS */ | |
| 251 | |
| 252 #ifndef FZ_ENABLE_ICC | |
| 253 #define FZ_ENABLE_ICC 1 | |
| 254 #endif /* FZ_ENABLE_ICC */ | |
| 255 | |
| 256 #ifdef FZ_ENABLE_HTML_ENGINE | |
| 257 #if FZ_ENABLE_HTML_ENGINE == 0 | |
| 258 #if FZ_ENABLE_HTML == 1 | |
| 259 #error FZ_ENABLE_HTML cannot work without FZ_ENABLE_HTML_ENGINE | |
| 260 #endif | |
| 261 #if FZ_ENABLE_EPUB == 1 | |
| 262 #error FZ_ENABLE_EPUB cannot work without FZ_ENABLE_HTML_ENGINE | |
| 263 #endif | |
| 264 #if FZ_ENABLE_MOBI == 1 | |
| 265 #error FZ_ENABLE_MOBI cannot work without FZ_ENABLE_HTML_ENGINE | |
| 266 #endif | |
| 267 #if FZ_ENABLE_FB2 == 1 | |
| 268 #error FZ_ENABLE_FB2 cannot work without FZ_ENABLE_HTML_ENGINE | |
| 269 #endif | |
| 270 #if FZ_ENABLE_TXT == 1 | |
| 271 #error FZ_ENABLE_TXT cannot work without FZ_ENABLE_HTML_ENGINE | |
| 272 #endif | |
| 273 #if FZ_ENABLE_OFFICE == 1 | |
| 274 #error FZ_ENABLE_OFFICE cannot work without FZ_ENABLE_HTML_ENGINE | |
| 275 #endif | |
| 276 #endif | |
| 277 #else | |
| 278 #if FZ_ENABLE_HTML || FZ_ENABLE_EPUB || FZ_ENABLE_MOBI || FZ_ENABLE_FB2 || FZ_ENABLE_TXT || FZ_ENABLE_OFFICE | |
| 279 #define FZ_ENABLE_HTML_ENGINE 1 | |
| 280 #else | |
| 281 #define FZ_ENABLE_HTML_ENGINE 0 | |
| 282 #endif | |
| 283 #endif | |
| 284 | |
| 285 /* If Epub and HTML are both disabled, disable SIL fonts */ | |
| 286 #if FZ_ENABLE_HTML == 0 && FZ_ENABLE_EPUB == 0 | |
| 287 #undef TOFU_SIL | |
| 288 #define TOFU_SIL | |
| 289 #endif | |
| 290 | |
| 291 #if !defined(HAVE_LEPTONICA) || !defined(HAVE_TESSERACT) | |
| 292 #ifndef OCR_DISABLED | |
| 293 #define OCR_DISABLED | |
| 294 #endif | |
| 295 #endif | |
| 296 | |
| 297 #if !defined(FZ_ENABLE_BARCODE) | |
| 298 #define FZ_ENABLE_BARCODE 1 | |
| 299 #endif | |
| 300 | |
| 301 #endif /* FZ_CONFIG_H */ |
