You are not logged in.

#1 2010-11-19 06:50:57

zoqaeski
Member
From: /earth/australia/.
Registered: 2009-09-30
Posts: 132

[SOLVED] xelatex weird font display issue

Hello all

I was playing around with fonts on my system today, and noticed that, all of a sudden, the fonts were being garbled by xelatex whenever I compiled a document. Backtracking to what I'd done, it turns out that xelatex will get confused by multiple occurrences of the same font in a fc-cache path (for want of a better term). Earlier on this afternoon, I'd recently followed a guide in the wiki (or thereabouts) to make some TeX fonts available to fc-cache. However, xelatex looks in the system font path when it loads them, and appears to discover two or more versions of the same font, and doesn't know which to substitute. Hence the output text gets a whole lot of characters messed up.

The solution is simple: remove the LaTeX fonts from the system search path. In my case, I'd symlinked `/etc/fonts/conf.avail/09-texlive-fonts.conf` to `/etc/fonts/conf.d/09-texlive-fonts.conf` (as you do to enable fontconfig rules), and run fc-cache to update them. Removing this link and updating the cache fixes the issue, after recompiling the affected documents.

Does anyone think I should edit the wiki to point this out for future reference? It had me confused for a bit (right when I need to compose a job application due Monday), and Google didn't say anything. It might be useful for other tinkerers.

Douglas Adams wrote:

A learning experience is something that tells you, "You know that thing you just did? Don't do that."

Appropriate? Perhaps.

Offline

#2 2010-11-19 06:58:01

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: [SOLVED] xelatex weird font display issue

I've had similar problems with XeLaTeX in the past. I hope they figure out a way to fix it.

I think perhaps the wiki should be edited to give a warning that this might happen, and maybe water down the suggestion for making TeX fonts available and/or suggest alternatives.

Personally, I quickly regretted the decision to make all the TeX fonts available to fontconfig, merely because the huge number of them (at least for a full TeXlive install) made using any font selection dialogue overwhelming. I've switched to fc-caching them manually if and when I need them.

Offline

Board footer

Powered by FluxBB