Closed philwinder closed 6 years ago
Hello @philwinder!
Thanks for taking care of filling this report with a complete use case. I got exactly the same thing here, so trying to reproduce.
The first pick is that some fonts might been removed with #39 (moving to alpine linux OS base). We'll give you some news as soon as we have things.
So here is a quick fix I did manually. I will work to put it on the image (and/or find a better solution).
It comes from the documents you linked: https://github.com/gjtorikian/mathematical#fonts-and-special-notices-for-mac-os-x
# From inside the Docker container
mkdir -p /usr/share/fonts/bakoma
cd /usr/share/fonts/bakoma
curl -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmex10.ttf \
-LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmmi10.ttf \
-LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmr10.ttf \
-LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmsy10.ttf \
-LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/esint10.ttf \
-LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/eufm10.ttf \
-LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/msam10.ttf \
-LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/msbm10.ttf
cd /documents
asciidoctor-pdf -r asciidoctor-mathematical -o test.pdf test.adoc
Ping @jirutka @mojavelinux @mgreau , do you have any knowledge about fonts and/or fonts in Alpine that could help here? I don't have any :)
@dduportal sorry I don't have any knowledge about fonts and/or fonts in Alpine
What fonts do you need - only those in the above snippet? I'll create a package for them.
Thanks for you answers @mgreau @jirutka!
@jirutka , based on the mathematical repository, it seems those fonts are OK on OS X, to have a correct rendering of such an issue.
Also, those fonts are rendering correctly some LateX things: might be a good idea to package them then :) Thanks!
I’ve created package font-bakoma. It’ll arrive to the testing repo in few hours. You can install it using e.g.:
apk add --no-cache --repository https://nl.alpinelinux.org/alpine/edge/testing font-bakoma-ttf
(or font-bakoma-otf for OpenType fonts)
Let me know if it helped, I’ll move it to the community repository.
Thanks @jirukta, you rocks!
The font is not available right now, but as you said, we'll wai a few hours :)
It will take longer because builders are now busy rebuilding pkgs after LibreSSL update. :(
No problem @jirutka , we'll wait. thanks for keeping us informed.
font-bakoma packages are finally on mirrors.
Hello @philwinder, a Pull request has been opened with a fix for this: #56 .
Can you check it (a prebuilt image is available to let you test) and confirm the fix is working for your case?
I took the liberty to reuse the code snippet you provided here to have a test case (the test case is not perfect: It would need to have an image analysis capability, but A first level of testing is here).
Hello! I am closing this issue since we did not had feedbacks from @philwinder .
The main Docker image (with the tag latest
) had been built with the change from #56 ,
which seems to fix the mathematical rendering by adding the right fonts.
Build on the DocerHub: https://hub.docker.com/r/asciidoctor/docker-asciidoctor/builds/bpxcqaqciueea2dahka9cep/
@philwinder , Please, feel free to re-open this issue or create a new one if it is not answering your use case, or if you are not happy with the outcomes of those changes. Thank you for taking time to write down the issue and documenting it!
On Ubuntu 22.04 one can fix this issue by installing sudo apt install fonts-lyx
Thanks for pointing that out. I'll add that this package is listed in the asciidoctor-mathematical readme. See https://github.com/asciidoctor/asciidoctor-mathematical/#ubuntu
Hi, thanks for this docker image.
It appears that some fonts are missing from the image.
Using the following asciidoc:
Then run the command (inside the running container):
asciidoctor-pdf -r asciidoctor-mathematical -o test.pdf test.adoc
The pdf renders the sqrt symbol incorrectly. (Similar to this issue: https://github.com/gjtorikian/mathematical/issues/79)
Are the fonts included ok?
Update:
I've just found a docker container that works: rochdev/alpine-asciidoctor:plus