Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/harfbuzz/README.mingw.md @ 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 For the development of HarfBuzz, the Microsoft shaping technology, Uniscribe, | |
| 2 as a widely used and tested shaper is used as more-or-less OpenType reference | |
| 3 implementation and that specially is important where OpenType specification | |
| 4 is or wasn't that clear. For having access to Uniscribe on Linux/macOS these | |
| 5 steps are recommended: | |
| 6 | |
| 7 You want to follow the 32bit instructions. The 64bit equivalents are included | |
| 8 for reference. | |
| 9 | |
| 10 1. Install Wine. | |
| 11 - Fedora: `dnf install wine`. | |
| 12 | |
| 13 2. Install `mingw-w64` compiler. | |
| 14 - Fedora, 32bit: `dnf install mingw32-gcc-c++` | |
| 15 - Fedora, 64bit: `dnf install mingw64-gcc-c++` | |
| 16 - Debian: `apt install g++-mingw-w64` | |
| 17 - Mac: `brew install mingw-w64` | |
| 18 | |
| 19 3. If you have drank the `meson` koolaid, look at `.ci/build-win32.sh` to see how to | |
| 20 invoke `meson` now, or just run that script. Otherwise, here's how to use the | |
| 21 old trusty autotools instead: | |
| 22 | |
| 23 a) Install dependencies. | |
| 24 - Fedora, 32bit: `dnf install mingw32-glib2 mingw32-cairo mingw32-freetype` | |
| 25 - Fedora, 64bit: `dnf install mingw64-glib2 mingw64-cairo mingw64-freetype` | |
| 26 | |
| 27 b) Configure: | |
| 28 - `NOCONFIGURE=1 ./autogen.sh && mkdir winbuild && cd winbuild` | |
| 29 - 32bit: `../mingw-configure.sh i686` | |
| 30 - 64bit: `../mingw-configure.sh x86_64` | |
| 31 | |
| 32 c) Build as usual: | |
| 33 - make | |
| 34 | |
| 35 d) Configure your wine to find system mingw libraries. See: | |
| 36 https://fedoraproject.org/wiki/MinGW/Configure_wine | |
| 37 | |
| 38 Now you can use `hb-shape` by `(cd win32build/util && wine hb-shape.exe)` | |
| 39 but if you like to shape with the Microsoft Uniscribe: | |
| 40 | |
| 41 4. Bring a 32bit version of `usp10.dll` for yourself from `C:\Windows\SysWOW64\usp10.dll` of your | |
| 42 Windows installation (assuming you have a 64-bit installation, otherwise | |
| 43 `C:\Windows\System32\usp10.dll`) that it is not a DirectWrite proxy | |
| 44 ([for more info](https://en.wikipedia.org/wiki/Uniscribe)). | |
| 45 Rule of thumb, your `usp10.dll` should have a size more than 500kb, otherwise | |
| 46 it is designed to work with DirectWrite which Wine can't work with its original one. | |
| 47 You want a Uniscribe from Windows 7 or older. | |
| 48 | |
| 49 Put the DLL in the folder you are going to run the next command, | |
| 50 | |
| 51 5. `WINEDLLOVERRIDES="usp10=n" wine hb-shape.exe fontname.ttf -u 0061,0062,0063 --shaper=uniscribe` | |
| 52 | |
| 53 (`0061,0062,0063` means `abc`, use test/shaping/hb-unicode-decode to generate ones you need) | |
| 54 | |
| 55 When you have built that, you can test HarfBuzz's native shaper against Uniscribe | |
| 56 following these instructions: | |
| 57 | |
| 58 https://github.com/harfbuzz/harfbuzz/issues/3671 |
