Closed skotniczny closed 6 years ago
Notice that currently compilation fails after apple emoji in the line: "The problem is that the 🍎 in the first line is treated as two code"
Besides in this case i would use Inconsolata with Cyrillic glyphs as mono font
What problems do the changes solve? The book currently builds for me, and the Chinese characters and apple are visible. FandolSong, for some reason, fails to load on my machine even though I've installed it via texlive-lang-chinese.
Please compile document with this line, it will be clear.
\defaultfontfeatures[\emojifont]{Color=FF0000}
Where should I look for the problem? The apple example and the mixed script one still look the same with that line added.
Look, after apple emoji - font size, quotation marks and dashes are broken
Still not sure what you mean. In trying to build with your changes, I am getting font errors. What way of installing FandolSong and CMU Serif do you recommend?
Try with direct path, for exapmple i use \newfontface{\emojifont}{Symbola_hint.ttf}[Path=/usr/share/fonts/truetype/ancient-scripts/]
and \setmonofont[Path=/usr/share/fonts/truetype/inconsolata-lgc/,Scale=0.8]{Inconsolata-LGC}
Ohh, I see what you mean now, after that point all quotes are messed up. That's awful. Trying to find a chinese font that actually works now.
Tried some fonts, but they all look worse than what I had before. What are the reasons for the changes to the handling of the Chinese text?
I guess, because now it work without errors. :( For example images also works even with bad syntax for \usepackage{graphicS}
Right. Errors or not, I've reverted a few changes to make the Chinese text look better, and merged the rest of your changes. Thanks for helping out with this! I'm quite clueless when it comes to LaTeX.
Oh, it seems that now the balloon emoji is screwing up all text after it. This is great.
And that is indeed caused by the changes I made to the CJK font handling... which is bizarre, since the problem is a long way from the Chinese characters.
Definitely it is not case better or worse looking fonts, they look like that because when compilation pass properly LaTeX set it monospaced at any cost. When compilation fails, characters are displayed in normal manner.
Using Inconsolata LGC does simplify things a bit. For some reason (doesn't seem to be the font's fault) the Greek letters get a bigger letter spacing even though they are using the same font, so that's not looking great, but I don't care too much.
In patch 5dabfda47f I also changed to an approach where I leave lst
for Chinese, Arabic, and emoji text, since it seemed to be impossible to get those to render in a good looking way in listings. The result looks better (but is rather fragile).
There's still a bunch of errors in the log that I don't understand, but the output look okay.
Try add π φ β ≈,
\usepackage{newunicodechar}
\newunicodechar{π}{$\pi$}
\newunicodechar{ϕ}{$\varphi$}
\newunicodechar{≈}{$\approx$}
\newunicodechar{β}{\ss}
Oh, good point, added in eb33c5d
It seems to work almost well