holzschu / lib-tex

pdftex and luatex as a library. Developped for iOS, but should work on all systems.
71 stars 8 forks source link

Support for XeLaTeX #4

Open kyuilisworking opened 3 years ago

kyuilisworking commented 3 years ago

Is there a plan to support XeTeX / XeLaTeX in the future as well? I'd also like to help out - if there is some documentation on how other projects are structured in general (for pdftex and luatex), that would help me get started.

holzschu commented 3 years ago

As for the how to do it, it’s relatively simple: cross compile to an arm64 binary (using cross-compiling tools), add dependency to ios_system for input, output and file system communication, and make sure memory is released when the command leaves.

For XeTeX, the problem is in the first step: it has a strong dependency on frameworks and libraries that are specific to OS X, and so it cannot be cross-compiled for arm64. Luatex code is much better for cross-compiling.

To the best of my knowledge, luatex abilities are a superset of those of XeTeX (anything XeTeX can do, luatex can also do), so there is little to be gained by adding XeTeX.