Fake slant does not play nice together with using scale for doing fake small caps with fontspec. There seems to be some kind of definition leakage in fontspec meaning that when I specify both SmallCapsFeature and SlantedFeatures my \scshape text also receives the slant. Expected behavior is that \textsc{FOO} should be small but straight and \textsl{FOO} should slanted. However, as shown in the examples below that is not the case, instead the \textsc{FOO} is both small and slanted.



  SmallCapsFont={Linux Libertine O},
  SlantedFont={Linux Libertine O},
]{Latin Modern Roman}

Small Caps is slanted now: \textsc{FOO} and also slanted is slanted: \textsl{FOO} 


enter image description here

  • Seems like a bug in fontspec. – egreg Feb 18 '15 at 16:25
  • @egreg: yea :( Is it possible to work around it somehow you think? – jonalv Feb 18 '15 at 16:27
  • I had to see @egreg's answer to understand the issue here. Could you be more specific in both your question title and question body about what the problem is, rather than saying it doesn't "play nice"? This site is not only for solving our own immediate problems, but also to serve as a resource for future visitors experiencing the same problems as we have now. – Sverre Feb 18 '15 at 16:41
  • @Sverre: Is that better? If not, "Patches welcome!" :) – jonalv Feb 19 '15 at 9:09
  • Definitely a bug, sorry. Will attempt to address soonish. One comment: the manual isn't very clear on this, but SmallCapsFont/Features should normally be nested inside SlantedFeatures={...}. Not that that fixes your problem! – Will Robertson Feb 19 '15 at 10:48

It seems like a bug in fontspec; you can cure it by specifying FakeSlant=0 for the small caps font.

\setmainfont{Latin Modern Roman}[
  SmallCapsFont={Linux Libertine O},
  SlantedFont={Linux Libertine O},

Note that I used the most recent version of fontspec, where the options are specified after the font name.

enter image description here

  • Wow, that's brilliant, and so easy! How do you come up with all these things? :) – jonalv Feb 18 '15 at 16:31
  • @jonalv Browsing the manual (not this time, but in the past) and applying some fantasy. ;-) – egreg Feb 18 '15 at 16:45
  • Hmm, definitely a bug. Without looking at the code, I suspect a variable scoping problem. – Will Robertson Feb 19 '15 at 10:46

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.