0

I'm working in a document with lualatex where I want to use the Adobe Source family: Source Sans Pro, Source Serif Pro and Source Code Pro.

My problem is that Source Serif Pro does not contain italics yet and I use quite \emph to highlight the text, which isn't noticeable when using this family. And I saw on the font site that the italics will be drawn someday, for now and in the near future it seems to Source Serif will continue without them.

So my first attempt to solution was add the line

\renewcommand{\familydefault}{\sfdefault}

in this way I could use SourcesSansProas the main font and in theory be able to use its obliques for \emph instead. Unfortunately my solution isn't working.

I can think of there may be a way to work with obliques that I don't know, or if isn't possible, redefine the command \emph to use boldface instead of italics for highlight the text.

This is my MWE BTW:

\documentclass[fontsize=10pt,paper=letter,headings=small,bibliography=totoc,DIV=9,headsepline=true,titlepage=on]{scrartcl} 
%\usepackage[spanish,mexico]{babel} 
\usepackage{fontspec} 
\defaultfontfeatures{Mapping=tex-text}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont{SourceSerifPro} 
\setsansfont{SourceSansPro} 
\setmonofont{SourceCodePro} 
\renewcommand{\familydefault}{\sfdefault}

\begin{document}

This is a proof paragraph containing \emph{highlighted text} and placeholder text: 
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\end{document}
  • Your MWE results for me in Source Sans Pro with italics as emphasis (when I used the font names with spaces). You can try the packages (\usepackage{sourcecodepro,sourceserifpro} \usepackage[default]{sourcesanspro}). It is also possible to use bold for \emph (see What is the canonical way to redefine the \emph command). – Silke Aug 4 '15 at 10:00
  • Thanks, but those packages work with LuaLaTeX or are made for use with pdfLaTeX? – Aradnix Aug 4 '15 at 17:14
  • 1
    Yes, the packages use fontspec and the original OpenType fonts when using LuaLaTeX or XeLaTeX, or converted Type1 fonts when using pdfLaTeX. I keep them reasonably up to date, so if your TeX distribution is up to date, so should the fonts. Also see the documentation for more information. – Silke Aug 4 '15 at 20:27
2

It is rather unclear what you actually want. But here two suggestions: You could still use SourceSerifPro as main font and fake a slanted font:

\documentclass[]{scrartcl}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{SourceSerifPro}[
 ItalicFont = SourceSerifPro,
 ItalicFeatures={FakeSlant=0.2}]

\begin{document}

This is a \emph{highlighted text} and placeholder text

\end{document}

enter image description here

Or you can use SourceSansPro as main font which will work out-of-the-box:

\documentclass[]{scrartcl}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{SourceSansPro}

\begin{document}

This is a \emph{highlighted text} and placeholder text

\end{document}

enter image description here

  • Well, in my LaTeX installation I can't get italic/oblique words when I compile using Source Serif/Sans Pro. Perhaps I have installed an old one version, I don't know, but I'll use the trick you bring me for the fake slanted font. – Aradnix Aug 4 '15 at 17:18
3

Italics for Source Serif Pro were released in August 2018. You should be able to use them directly now.

https://github.com/adobe-fonts/source-serif-pro/releases/tag/2.007R-ro/1.007R-it

As of September 2018, the sourceserifpro package has Source Serif Pro italics. So, \emph{} will function as desired if the command \usepackage{sourceserifpro} is placed in your document's preamble.

  • This is excellent news, in my work we stopped using Source Pro and instead used Merriweather because of its limitations. I'm so glad to see it has improved. I will try to use it soon, thank you very much, I didn't really know about this improvement until now. – Aradnix Aug 26 '18 at 7:14

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.