4

The code below produces different outputs when using xelatex ou lualatex to compile it

\usepackage{fontspec}
\setmainfont{Pecita}
\begin{document}
test using Pecita font
\end{document}

Using lualatex i get:

enter image description here

Using xelatex i get:

enter image description here

which is the way it should look.

Does fontspec behaves differently when using xelatex ou lualatex? If yes, what are the differences?

Pecita is a free font that can be obtained from http://pecita.eu/

Ulrike Fischer answer solves part of the "problem". But the use of a different f is still a problem, particularly when used after a j. Using the +aalt feature and lualatex i get

jf_lualatex

Using xelatex i get

jf_xelatex

which, again, is the expected result.

  • 2
    the difference is not so much fontspec, it is the OpenType engine used by XeLaTeX or LuaLaTeX; they are certainly not equivalent. – Will Robertson Sep 4 '15 at 13:51
  • @will-robertson ok, so this is the expected behavior... in that case, the question doesn't make sense anymore... should i delete it? – joão gândara Sep 4 '15 at 14:01
  • Don't delete it yet -- you may yet receive some more details on why/more specific limitations from someone else (it's late here...) :) – Will Robertson Sep 4 '15 at 14:04
  • You could report to the font authors that the features aalt, ccmp, mark, rlig are not documented on their homepage. You could be lucky by trying some languages. Very tedious of course. \defaultfontfeatures{Language=French} looks different than \defaultfontfeatures{Language=English} – LaRiFaRi Sep 4 '15 at 15:02
  • @LaRiFaRi I think that's only because there are some (very few) specific English glyphs in the font. I'd doubt you'd see any differences when comparing other languages besides English. – Sverre Sep 4 '15 at 15:25
4

It works for me with lualatex when I activate the +aalt feature (but the f is a bit different):

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Pecita}[RawFeature={+aalt}]
\begin{document}
test using Pecita font
\end{document}

enter image description here

But don't ask me, why xelatex uses it directly ...

  • that solves part of the "problem", but the use of a different f is still an issue, particularly when used after a j (as in jf). I've updated my question with this issue. – joão gândara Sep 4 '15 at 14:31
  • Where did you find that? Searched everything :-) It is not even in the fontspec doc. The doc of Pecita just tells about calt,liga,locl,smcp,subs,sups which are all not the desired switches. – LaRiFaRi Sep 4 '15 at 14:35
  • 1
    @LaRiFaRi: I checked the open type features with otfinfo and by looking in the pecita.lua. – Ulrike Fischer Sep 4 '15 at 14:47
  • 1
    @joãogândara: I tried with context and imho the font isn't working correctly there too. As context is the source for the lualatex fontloader the context maintainers can perhaps tell you what's going on if you ask on the context mailing list (and perhaps they are interested in such a complicated font). – Ulrike Fischer Sep 4 '15 at 14:50
  • @UlrikeFischer Thank you. Very cool. Something nice learned at the end of the week. – LaRiFaRi Sep 4 '15 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.