comparison mupdf-source/docs/reference/javascript/functions.rst @ 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 .. default-domain:: js
2
3 .. highlight:: javascript
4
5 Functions
6 =========
7
8 Most functionality is provided by member functions of class objects.
9 There are just a couple of top level configuration functions listed
10 here.
11
12 .. function:: mupdf.installLoadFontFunction(callback)
13
14 Install a handler to load system (or missing) fonts.
15
16 The callback function will be called with four arguments:
17
18 .. code-block::
19
20 callback(fontName, scriptName, isBold, isItalic)
21
22 The callback should return either a `Font` object for the requested
23 font, or ``null`` if an exact match cannot be found (so that the font
24 loading machinery can keep looking through the chain of fallback
25 fonts).
26
27 .. function:: mupdf.enableICC()
28
29 Enable ICC-profiles based operation.
30
31 .. function:: mupdf.disableICC()
32
33 Disable ICC-profiles based operation.
34
35 .. function:: mupdf.setUserCSS(stylesheet, useDocumentStyles)
36
37 Set a style sheet to apply to all reflowable documents.
38
39 :param string stylesheet: The CSS text to use.
40 :param boolean useDocumentStyles:
41 Whether to respect the document's own style sheet.