EB Garamond, and fontspec for “optical bold” with small caps?











up vote
1
down vote

favorite
1












This is somewhat a continuation of my EB Garamond (bold) small caps "suddenly" unavailable in lualatex? ; below, I had written some more details about this font for reference - but in brief, my question is:



Is there a way to set up fontspec with EB Garamond, so:




  • normal text (within a newfontfamily command) uses EB Garamond 12;

  • then when text is bolded within the same newfontfamily command (with bfseries, textbf) the font switches to EB Garamond 08;

  • and when small-caps textsc is used, either a) Letters=SmallCaps is used, or b) EB Garamond SC font is used?


... such that it would also get rid of these warnings:



LaTeX Font Warning: Font shape `EU2/EBGaramond(0)/bx/n' undefined
(Font) using `EU2/EBGaramond(0)/m/n' instead on input line 31.


... when compiling the following MWE, test.tex, with lualatex:



PassOptionsToPackage{dvipsnames}{xcolor}

% compile with: lualatex test.tex

documentclass[10pt,a4paper]{article}

makeatletter
newcommand{name}[1]{def@name{#1}}
makeatother

usepackage[margin=2cm]{geometry}
geometry{left=1.25cm,right=1.25cm,top=1.25cm,bottom=1.25cm}

usepackage{fontspec}

newfontfamilytitlenamefont{EB Garamond}[Ligatures=TeX]

% NOTE: `SmallCapsFeatures={Letters=SmallCaps}`, as per https://tex.stackexchange.com/questions/114223/, does not force small caps here, only `Letters=SmallCaps` does!?
newfontfamilytitlenamefontB{EB Garamond}[Ligatures=TeX,Letters=SmallCaps]

newfontfamilytitlenamefontC{EB Garamond 08 Regular}[OpticalSize=0,Letters=SmallCaps,Ligatures=TeX]

usepackage[hidelinks=true]{hyperref}

begin{document}

name{hspace{4em}addfontfeature{LetterSpace=10.0}textsc{Brazen Discovery}}

begingroup
makeatletter
{ifcsname titlenamefontendcsnametitlenamefontfi Hugebfseries{@name}par}
makeatother
endgroupmedskip

begingroup
makeatletter
{titlenamefontB Hugebfseries{@name}par}
makeatother
endgroupmedskip

begingroup
makeatletter
{titlenamefontC Hugebfseries{@name}par}
makeatother
endgroupmedskip

Testing some normal paragraph text here...

end{document}


The current output of this is:



Screenshot-test.pdf.png



Since my original post, I have done a fresh install of TexLive 2015, and realized the following: originally, I had wanted to achieve bolded small caps; probably by accident, I managed to use EB Garamond 08 instead of EB Garamond 12, which does look slightly more bolded, but is otherwise considered simply a different optical size (How do I use EB Garamond 08?) - while there is no proper "bold" in EB Garamond.



So, I ended up believing that this "bolding" is a result of using bfseries - so when I tried compiling at a later time and couldn't see the "bolding", I wrote my original post, suspecting installation issues.



Now, at least I can state that I have these 10 .otf font files in ~/.local/share/fonts (Ubuntu 14):



$ ls -la ~/.local/share/fonts/EBGaramond*
-rw-r--r-- 1 user user 200656 Apr 8 2014 ~/.local/share/fonts/EBGaramond08-Italic.otf
-rw-r--r-- 1 user user 259968 Apr 8 2014 ~/.local/share/fonts/EBGaramond08-Regular.otf
-rw-r--r-- 1 user user 212492 Apr 8 2014 ~/.local/share/fonts/EBGaramond12-AllSC.otf
-rw-r--r-- 1 user user 298252 Apr 8 2014 ~/.local/share/fonts/EBGaramond12-Italic.otf
-rw-r--r-- 1 user user 495300 Apr 8 2014 ~/.local/share/fonts/EBGaramond12-Regular.otf
-rw-r--r-- 1 user user 60240 Apr 8 2014 ~/.local/share/fonts/EBGaramond-InitialsF1.otf
-rw-r--r-- 1 user user 5120 Apr 8 2014 ~/.local/share/fonts/EBGaramond-InitialsF2.otf
-rw-r--r-- 1 user user 78512 Apr 8 2014 ~/.local/share/fonts/EBGaramond-Initials.otf
-rw-r--r-- 1 user user 226840 Apr 8 2014 ~/.local/share/fonts/EBGaramondSC08-Regular.otf
-rw-r--r-- 1 user user 353364 Apr 8 2014 ~/.local/share/fonts/EBGaramondSC12-Regular.otf


... and they have been obtained directly from http://www.georgduffner.at/ebgaramond/download.html ; my ~/.fonts directory is now empty.



I have also done fc-cache:



$ fc-cache -f -v ; fc-list | grep aramond
...
fc-cache: succeeded
~/.local/share/fonts/EBGaramond12-Regular.otf: EB Garamond,EB Garamond 12:style=12 Regular,Regular
~/.local/share/fonts/EBGaramond12-Italic.otf: EB Garamond,EB Garamond 12:style=12 Italic,Italic
~/.local/share/fonts/EBGaramondSC12-Regular.otf: EB Garamond SC,EB Garamond SC 12:style=12 Regular,Regular
~/.local/share/fonts/EBGaramond08-Regular.otf: EB Garamond,EB Garamond 08:style=08 Regular,Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
~/.local/share/fonts/EBGaramond08-Italic.otf: EB Garamond,EB Garamond 08:style=08 Italic,Cursiva,kurzíva,kursiv,Πλάγια,Italic,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,Poševno,Etzana
~/.local/share/fonts/EBGaramond-InitialsF1.otf: EB Garamond Initials Fill1:style=Regular
~/.local/share/fonts/EBGaramond-InitialsF2.otf: EB Garamond Initials Fill2:style=Regular
~/.local/share/fonts/EBGaramondSC08-Regular.otf: EB Garamond SC,EB Garamond SC 08:style=08 Regular,Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
~/.local/share/fonts/EBGaramond12-AllSC.otf: EB Garamond 12 All SC:style=AllSC
~/.local/share/fonts/EBGaramond-Initials.otf: EB Garamond Initials:style=Regular


And this is how the font appears in fontmatrix:



Screenshot-Fontmatrix1.png



So, even if I have 10 .otf font files installed, I have only 6 entries in fontmatrix... So these entries here are I guess "font families", that is "EB Garamond" is one font family, "EB Garamond SC" is another?



This is what I get when I double-click the "EB Garamond" entry in fontmatrix:



Screenshot-Fontmatrix2.png



So, here I can see the entries (I guess) for EBGaramond08-Italic.otf, EBGaramond08-Regular.otf, EBGaramond12-Italic.otf, EBGaramond12-Regular.otf. And when I select the "08 Italic" button, I'm told that the current font is "EB Garamond 08 Italic".



I get something similar, when I click on "EB Garamond SC":



Screenshot-Fontmatrix3.png



The entries "08 Regular" and "12 Regular" probably represent EBGaramondSC08-Regular.otf and EBGaramondSC12-Regular.otf.



As a note, say LibreOffice Writes does not group these fonts, but each has a separate entry:



Screenshot-LibreOfficeWriter.png



Anyways, to repeat my question in other terms now: is there a way for setting up a newfontfamily, say titlenamefont, in fontspec, such that:




  • When {titlenamefont Huge{MYTEXT}} is used, the font rendered is "EB Garamond 12 Regular"

  • When {titlenamefont Hugebfseries{MYTEXT}} is used, the font rendered is "EB Garamond 08 Regular" (without generating warnings in latex log about nonexisting bold face)

  • When {titlenamefont Hugebfseries{textsc{MYTEXT}}} is used, the font rendered is a) either "EB Garamond 08 Regular" with Letters=SmallCaps option; or b) "EB Garamond SC 08 Regular"

  • When {titlenamefont Huge{textsc{MYTEXT}}} is used (so without bold), the font rendered is a) either "EB Garamond 12 Regular" with Letters=SmallCaps option; or b) "EB Garamond SC 12 Regular"


(Side question: in the above MWE, why does SmallCapsFeatures={Letters=SmallCaps} not generate any small caps with textsc, and just {Letters=SmallCaps} does?)










share|improve this question














bumped to the homepage by Community 30 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 3




    Sorry, but I don't understand why you want boldface Garamond: it's a crime against typography.
    – egreg
    Aug 28 at 17:34















up vote
1
down vote

favorite
1












This is somewhat a continuation of my EB Garamond (bold) small caps "suddenly" unavailable in lualatex? ; below, I had written some more details about this font for reference - but in brief, my question is:



Is there a way to set up fontspec with EB Garamond, so:




  • normal text (within a newfontfamily command) uses EB Garamond 12;

  • then when text is bolded within the same newfontfamily command (with bfseries, textbf) the font switches to EB Garamond 08;

  • and when small-caps textsc is used, either a) Letters=SmallCaps is used, or b) EB Garamond SC font is used?


... such that it would also get rid of these warnings:



LaTeX Font Warning: Font shape `EU2/EBGaramond(0)/bx/n' undefined
(Font) using `EU2/EBGaramond(0)/m/n' instead on input line 31.


... when compiling the following MWE, test.tex, with lualatex:



PassOptionsToPackage{dvipsnames}{xcolor}

% compile with: lualatex test.tex

documentclass[10pt,a4paper]{article}

makeatletter
newcommand{name}[1]{def@name{#1}}
makeatother

usepackage[margin=2cm]{geometry}
geometry{left=1.25cm,right=1.25cm,top=1.25cm,bottom=1.25cm}

usepackage{fontspec}

newfontfamilytitlenamefont{EB Garamond}[Ligatures=TeX]

% NOTE: `SmallCapsFeatures={Letters=SmallCaps}`, as per https://tex.stackexchange.com/questions/114223/, does not force small caps here, only `Letters=SmallCaps` does!?
newfontfamilytitlenamefontB{EB Garamond}[Ligatures=TeX,Letters=SmallCaps]

newfontfamilytitlenamefontC{EB Garamond 08 Regular}[OpticalSize=0,Letters=SmallCaps,Ligatures=TeX]

usepackage[hidelinks=true]{hyperref}

begin{document}

name{hspace{4em}addfontfeature{LetterSpace=10.0}textsc{Brazen Discovery}}

begingroup
makeatletter
{ifcsname titlenamefontendcsnametitlenamefontfi Hugebfseries{@name}par}
makeatother
endgroupmedskip

begingroup
makeatletter
{titlenamefontB Hugebfseries{@name}par}
makeatother
endgroupmedskip

begingroup
makeatletter
{titlenamefontC Hugebfseries{@name}par}
makeatother
endgroupmedskip

Testing some normal paragraph text here...

end{document}


The current output of this is:



Screenshot-test.pdf.png



Since my original post, I have done a fresh install of TexLive 2015, and realized the following: originally, I had wanted to achieve bolded small caps; probably by accident, I managed to use EB Garamond 08 instead of EB Garamond 12, which does look slightly more bolded, but is otherwise considered simply a different optical size (How do I use EB Garamond 08?) - while there is no proper "bold" in EB Garamond.



So, I ended up believing that this "bolding" is a result of using bfseries - so when I tried compiling at a later time and couldn't see the "bolding", I wrote my original post, suspecting installation issues.



Now, at least I can state that I have these 10 .otf font files in ~/.local/share/fonts (Ubuntu 14):



$ ls -la ~/.local/share/fonts/EBGaramond*
-rw-r--r-- 1 user user 200656 Apr 8 2014 ~/.local/share/fonts/EBGaramond08-Italic.otf
-rw-r--r-- 1 user user 259968 Apr 8 2014 ~/.local/share/fonts/EBGaramond08-Regular.otf
-rw-r--r-- 1 user user 212492 Apr 8 2014 ~/.local/share/fonts/EBGaramond12-AllSC.otf
-rw-r--r-- 1 user user 298252 Apr 8 2014 ~/.local/share/fonts/EBGaramond12-Italic.otf
-rw-r--r-- 1 user user 495300 Apr 8 2014 ~/.local/share/fonts/EBGaramond12-Regular.otf
-rw-r--r-- 1 user user 60240 Apr 8 2014 ~/.local/share/fonts/EBGaramond-InitialsF1.otf
-rw-r--r-- 1 user user 5120 Apr 8 2014 ~/.local/share/fonts/EBGaramond-InitialsF2.otf
-rw-r--r-- 1 user user 78512 Apr 8 2014 ~/.local/share/fonts/EBGaramond-Initials.otf
-rw-r--r-- 1 user user 226840 Apr 8 2014 ~/.local/share/fonts/EBGaramondSC08-Regular.otf
-rw-r--r-- 1 user user 353364 Apr 8 2014 ~/.local/share/fonts/EBGaramondSC12-Regular.otf


... and they have been obtained directly from http://www.georgduffner.at/ebgaramond/download.html ; my ~/.fonts directory is now empty.



I have also done fc-cache:



$ fc-cache -f -v ; fc-list | grep aramond
...
fc-cache: succeeded
~/.local/share/fonts/EBGaramond12-Regular.otf: EB Garamond,EB Garamond 12:style=12 Regular,Regular
~/.local/share/fonts/EBGaramond12-Italic.otf: EB Garamond,EB Garamond 12:style=12 Italic,Italic
~/.local/share/fonts/EBGaramondSC12-Regular.otf: EB Garamond SC,EB Garamond SC 12:style=12 Regular,Regular
~/.local/share/fonts/EBGaramond08-Regular.otf: EB Garamond,EB Garamond 08:style=08 Regular,Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
~/.local/share/fonts/EBGaramond08-Italic.otf: EB Garamond,EB Garamond 08:style=08 Italic,Cursiva,kurzíva,kursiv,Πλάγια,Italic,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,Poševno,Etzana
~/.local/share/fonts/EBGaramond-InitialsF1.otf: EB Garamond Initials Fill1:style=Regular
~/.local/share/fonts/EBGaramond-InitialsF2.otf: EB Garamond Initials Fill2:style=Regular
~/.local/share/fonts/EBGaramondSC08-Regular.otf: EB Garamond SC,EB Garamond SC 08:style=08 Regular,Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
~/.local/share/fonts/EBGaramond12-AllSC.otf: EB Garamond 12 All SC:style=AllSC
~/.local/share/fonts/EBGaramond-Initials.otf: EB Garamond Initials:style=Regular


And this is how the font appears in fontmatrix:



Screenshot-Fontmatrix1.png



So, even if I have 10 .otf font files installed, I have only 6 entries in fontmatrix... So these entries here are I guess "font families", that is "EB Garamond" is one font family, "EB Garamond SC" is another?



This is what I get when I double-click the "EB Garamond" entry in fontmatrix:



Screenshot-Fontmatrix2.png



So, here I can see the entries (I guess) for EBGaramond08-Italic.otf, EBGaramond08-Regular.otf, EBGaramond12-Italic.otf, EBGaramond12-Regular.otf. And when I select the "08 Italic" button, I'm told that the current font is "EB Garamond 08 Italic".



I get something similar, when I click on "EB Garamond SC":



Screenshot-Fontmatrix3.png



The entries "08 Regular" and "12 Regular" probably represent EBGaramondSC08-Regular.otf and EBGaramondSC12-Regular.otf.



As a note, say LibreOffice Writes does not group these fonts, but each has a separate entry:



Screenshot-LibreOfficeWriter.png



Anyways, to repeat my question in other terms now: is there a way for setting up a newfontfamily, say titlenamefont, in fontspec, such that:




  • When {titlenamefont Huge{MYTEXT}} is used, the font rendered is "EB Garamond 12 Regular"

  • When {titlenamefont Hugebfseries{MYTEXT}} is used, the font rendered is "EB Garamond 08 Regular" (without generating warnings in latex log about nonexisting bold face)

  • When {titlenamefont Hugebfseries{textsc{MYTEXT}}} is used, the font rendered is a) either "EB Garamond 08 Regular" with Letters=SmallCaps option; or b) "EB Garamond SC 08 Regular"

  • When {titlenamefont Huge{textsc{MYTEXT}}} is used (so without bold), the font rendered is a) either "EB Garamond 12 Regular" with Letters=SmallCaps option; or b) "EB Garamond SC 12 Regular"


(Side question: in the above MWE, why does SmallCapsFeatures={Letters=SmallCaps} not generate any small caps with textsc, and just {Letters=SmallCaps} does?)










share|improve this question














bumped to the homepage by Community 30 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 3




    Sorry, but I don't understand why you want boldface Garamond: it's a crime against typography.
    – egreg
    Aug 28 at 17:34













up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





This is somewhat a continuation of my EB Garamond (bold) small caps "suddenly" unavailable in lualatex? ; below, I had written some more details about this font for reference - but in brief, my question is:



Is there a way to set up fontspec with EB Garamond, so:




  • normal text (within a newfontfamily command) uses EB Garamond 12;

  • then when text is bolded within the same newfontfamily command (with bfseries, textbf) the font switches to EB Garamond 08;

  • and when small-caps textsc is used, either a) Letters=SmallCaps is used, or b) EB Garamond SC font is used?


... such that it would also get rid of these warnings:



LaTeX Font Warning: Font shape `EU2/EBGaramond(0)/bx/n' undefined
(Font) using `EU2/EBGaramond(0)/m/n' instead on input line 31.


... when compiling the following MWE, test.tex, with lualatex:



PassOptionsToPackage{dvipsnames}{xcolor}

% compile with: lualatex test.tex

documentclass[10pt,a4paper]{article}

makeatletter
newcommand{name}[1]{def@name{#1}}
makeatother

usepackage[margin=2cm]{geometry}
geometry{left=1.25cm,right=1.25cm,top=1.25cm,bottom=1.25cm}

usepackage{fontspec}

newfontfamilytitlenamefont{EB Garamond}[Ligatures=TeX]

% NOTE: `SmallCapsFeatures={Letters=SmallCaps}`, as per https://tex.stackexchange.com/questions/114223/, does not force small caps here, only `Letters=SmallCaps` does!?
newfontfamilytitlenamefontB{EB Garamond}[Ligatures=TeX,Letters=SmallCaps]

newfontfamilytitlenamefontC{EB Garamond 08 Regular}[OpticalSize=0,Letters=SmallCaps,Ligatures=TeX]

usepackage[hidelinks=true]{hyperref}

begin{document}

name{hspace{4em}addfontfeature{LetterSpace=10.0}textsc{Brazen Discovery}}

begingroup
makeatletter
{ifcsname titlenamefontendcsnametitlenamefontfi Hugebfseries{@name}par}
makeatother
endgroupmedskip

begingroup
makeatletter
{titlenamefontB Hugebfseries{@name}par}
makeatother
endgroupmedskip

begingroup
makeatletter
{titlenamefontC Hugebfseries{@name}par}
makeatother
endgroupmedskip

Testing some normal paragraph text here...

end{document}


The current output of this is:



Screenshot-test.pdf.png



Since my original post, I have done a fresh install of TexLive 2015, and realized the following: originally, I had wanted to achieve bolded small caps; probably by accident, I managed to use EB Garamond 08 instead of EB Garamond 12, which does look slightly more bolded, but is otherwise considered simply a different optical size (How do I use EB Garamond 08?) - while there is no proper "bold" in EB Garamond.



So, I ended up believing that this "bolding" is a result of using bfseries - so when I tried compiling at a later time and couldn't see the "bolding", I wrote my original post, suspecting installation issues.



Now, at least I can state that I have these 10 .otf font files in ~/.local/share/fonts (Ubuntu 14):



$ ls -la ~/.local/share/fonts/EBGaramond*
-rw-r--r-- 1 user user 200656 Apr 8 2014 ~/.local/share/fonts/EBGaramond08-Italic.otf
-rw-r--r-- 1 user user 259968 Apr 8 2014 ~/.local/share/fonts/EBGaramond08-Regular.otf
-rw-r--r-- 1 user user 212492 Apr 8 2014 ~/.local/share/fonts/EBGaramond12-AllSC.otf
-rw-r--r-- 1 user user 298252 Apr 8 2014 ~/.local/share/fonts/EBGaramond12-Italic.otf
-rw-r--r-- 1 user user 495300 Apr 8 2014 ~/.local/share/fonts/EBGaramond12-Regular.otf
-rw-r--r-- 1 user user 60240 Apr 8 2014 ~/.local/share/fonts/EBGaramond-InitialsF1.otf
-rw-r--r-- 1 user user 5120 Apr 8 2014 ~/.local/share/fonts/EBGaramond-InitialsF2.otf
-rw-r--r-- 1 user user 78512 Apr 8 2014 ~/.local/share/fonts/EBGaramond-Initials.otf
-rw-r--r-- 1 user user 226840 Apr 8 2014 ~/.local/share/fonts/EBGaramondSC08-Regular.otf
-rw-r--r-- 1 user user 353364 Apr 8 2014 ~/.local/share/fonts/EBGaramondSC12-Regular.otf


... and they have been obtained directly from http://www.georgduffner.at/ebgaramond/download.html ; my ~/.fonts directory is now empty.



I have also done fc-cache:



$ fc-cache -f -v ; fc-list | grep aramond
...
fc-cache: succeeded
~/.local/share/fonts/EBGaramond12-Regular.otf: EB Garamond,EB Garamond 12:style=12 Regular,Regular
~/.local/share/fonts/EBGaramond12-Italic.otf: EB Garamond,EB Garamond 12:style=12 Italic,Italic
~/.local/share/fonts/EBGaramondSC12-Regular.otf: EB Garamond SC,EB Garamond SC 12:style=12 Regular,Regular
~/.local/share/fonts/EBGaramond08-Regular.otf: EB Garamond,EB Garamond 08:style=08 Regular,Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
~/.local/share/fonts/EBGaramond08-Italic.otf: EB Garamond,EB Garamond 08:style=08 Italic,Cursiva,kurzíva,kursiv,Πλάγια,Italic,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,Poševno,Etzana
~/.local/share/fonts/EBGaramond-InitialsF1.otf: EB Garamond Initials Fill1:style=Regular
~/.local/share/fonts/EBGaramond-InitialsF2.otf: EB Garamond Initials Fill2:style=Regular
~/.local/share/fonts/EBGaramondSC08-Regular.otf: EB Garamond SC,EB Garamond SC 08:style=08 Regular,Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
~/.local/share/fonts/EBGaramond12-AllSC.otf: EB Garamond 12 All SC:style=AllSC
~/.local/share/fonts/EBGaramond-Initials.otf: EB Garamond Initials:style=Regular


And this is how the font appears in fontmatrix:



Screenshot-Fontmatrix1.png



So, even if I have 10 .otf font files installed, I have only 6 entries in fontmatrix... So these entries here are I guess "font families", that is "EB Garamond" is one font family, "EB Garamond SC" is another?



This is what I get when I double-click the "EB Garamond" entry in fontmatrix:



Screenshot-Fontmatrix2.png



So, here I can see the entries (I guess) for EBGaramond08-Italic.otf, EBGaramond08-Regular.otf, EBGaramond12-Italic.otf, EBGaramond12-Regular.otf. And when I select the "08 Italic" button, I'm told that the current font is "EB Garamond 08 Italic".



I get something similar, when I click on "EB Garamond SC":



Screenshot-Fontmatrix3.png



The entries "08 Regular" and "12 Regular" probably represent EBGaramondSC08-Regular.otf and EBGaramondSC12-Regular.otf.



As a note, say LibreOffice Writes does not group these fonts, but each has a separate entry:



Screenshot-LibreOfficeWriter.png



Anyways, to repeat my question in other terms now: is there a way for setting up a newfontfamily, say titlenamefont, in fontspec, such that:




  • When {titlenamefont Huge{MYTEXT}} is used, the font rendered is "EB Garamond 12 Regular"

  • When {titlenamefont Hugebfseries{MYTEXT}} is used, the font rendered is "EB Garamond 08 Regular" (without generating warnings in latex log about nonexisting bold face)

  • When {titlenamefont Hugebfseries{textsc{MYTEXT}}} is used, the font rendered is a) either "EB Garamond 08 Regular" with Letters=SmallCaps option; or b) "EB Garamond SC 08 Regular"

  • When {titlenamefont Huge{textsc{MYTEXT}}} is used (so without bold), the font rendered is a) either "EB Garamond 12 Regular" with Letters=SmallCaps option; or b) "EB Garamond SC 12 Regular"


(Side question: in the above MWE, why does SmallCapsFeatures={Letters=SmallCaps} not generate any small caps with textsc, and just {Letters=SmallCaps} does?)










share|improve this question













This is somewhat a continuation of my EB Garamond (bold) small caps "suddenly" unavailable in lualatex? ; below, I had written some more details about this font for reference - but in brief, my question is:



Is there a way to set up fontspec with EB Garamond, so:




  • normal text (within a newfontfamily command) uses EB Garamond 12;

  • then when text is bolded within the same newfontfamily command (with bfseries, textbf) the font switches to EB Garamond 08;

  • and when small-caps textsc is used, either a) Letters=SmallCaps is used, or b) EB Garamond SC font is used?


... such that it would also get rid of these warnings:



LaTeX Font Warning: Font shape `EU2/EBGaramond(0)/bx/n' undefined
(Font) using `EU2/EBGaramond(0)/m/n' instead on input line 31.


... when compiling the following MWE, test.tex, with lualatex:



PassOptionsToPackage{dvipsnames}{xcolor}

% compile with: lualatex test.tex

documentclass[10pt,a4paper]{article}

makeatletter
newcommand{name}[1]{def@name{#1}}
makeatother

usepackage[margin=2cm]{geometry}
geometry{left=1.25cm,right=1.25cm,top=1.25cm,bottom=1.25cm}

usepackage{fontspec}

newfontfamilytitlenamefont{EB Garamond}[Ligatures=TeX]

% NOTE: `SmallCapsFeatures={Letters=SmallCaps}`, as per https://tex.stackexchange.com/questions/114223/, does not force small caps here, only `Letters=SmallCaps` does!?
newfontfamilytitlenamefontB{EB Garamond}[Ligatures=TeX,Letters=SmallCaps]

newfontfamilytitlenamefontC{EB Garamond 08 Regular}[OpticalSize=0,Letters=SmallCaps,Ligatures=TeX]

usepackage[hidelinks=true]{hyperref}

begin{document}

name{hspace{4em}addfontfeature{LetterSpace=10.0}textsc{Brazen Discovery}}

begingroup
makeatletter
{ifcsname titlenamefontendcsnametitlenamefontfi Hugebfseries{@name}par}
makeatother
endgroupmedskip

begingroup
makeatletter
{titlenamefontB Hugebfseries{@name}par}
makeatother
endgroupmedskip

begingroup
makeatletter
{titlenamefontC Hugebfseries{@name}par}
makeatother
endgroupmedskip

Testing some normal paragraph text here...

end{document}


The current output of this is:



Screenshot-test.pdf.png



Since my original post, I have done a fresh install of TexLive 2015, and realized the following: originally, I had wanted to achieve bolded small caps; probably by accident, I managed to use EB Garamond 08 instead of EB Garamond 12, which does look slightly more bolded, but is otherwise considered simply a different optical size (How do I use EB Garamond 08?) - while there is no proper "bold" in EB Garamond.



So, I ended up believing that this "bolding" is a result of using bfseries - so when I tried compiling at a later time and couldn't see the "bolding", I wrote my original post, suspecting installation issues.



Now, at least I can state that I have these 10 .otf font files in ~/.local/share/fonts (Ubuntu 14):



$ ls -la ~/.local/share/fonts/EBGaramond*
-rw-r--r-- 1 user user 200656 Apr 8 2014 ~/.local/share/fonts/EBGaramond08-Italic.otf
-rw-r--r-- 1 user user 259968 Apr 8 2014 ~/.local/share/fonts/EBGaramond08-Regular.otf
-rw-r--r-- 1 user user 212492 Apr 8 2014 ~/.local/share/fonts/EBGaramond12-AllSC.otf
-rw-r--r-- 1 user user 298252 Apr 8 2014 ~/.local/share/fonts/EBGaramond12-Italic.otf
-rw-r--r-- 1 user user 495300 Apr 8 2014 ~/.local/share/fonts/EBGaramond12-Regular.otf
-rw-r--r-- 1 user user 60240 Apr 8 2014 ~/.local/share/fonts/EBGaramond-InitialsF1.otf
-rw-r--r-- 1 user user 5120 Apr 8 2014 ~/.local/share/fonts/EBGaramond-InitialsF2.otf
-rw-r--r-- 1 user user 78512 Apr 8 2014 ~/.local/share/fonts/EBGaramond-Initials.otf
-rw-r--r-- 1 user user 226840 Apr 8 2014 ~/.local/share/fonts/EBGaramondSC08-Regular.otf
-rw-r--r-- 1 user user 353364 Apr 8 2014 ~/.local/share/fonts/EBGaramondSC12-Regular.otf


... and they have been obtained directly from http://www.georgduffner.at/ebgaramond/download.html ; my ~/.fonts directory is now empty.



I have also done fc-cache:



$ fc-cache -f -v ; fc-list | grep aramond
...
fc-cache: succeeded
~/.local/share/fonts/EBGaramond12-Regular.otf: EB Garamond,EB Garamond 12:style=12 Regular,Regular
~/.local/share/fonts/EBGaramond12-Italic.otf: EB Garamond,EB Garamond 12:style=12 Italic,Italic
~/.local/share/fonts/EBGaramondSC12-Regular.otf: EB Garamond SC,EB Garamond SC 12:style=12 Regular,Regular
~/.local/share/fonts/EBGaramond08-Regular.otf: EB Garamond,EB Garamond 08:style=08 Regular,Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
~/.local/share/fonts/EBGaramond08-Italic.otf: EB Garamond,EB Garamond 08:style=08 Italic,Cursiva,kurzíva,kursiv,Πλάγια,Italic,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,Poševno,Etzana
~/.local/share/fonts/EBGaramond-InitialsF1.otf: EB Garamond Initials Fill1:style=Regular
~/.local/share/fonts/EBGaramond-InitialsF2.otf: EB Garamond Initials Fill2:style=Regular
~/.local/share/fonts/EBGaramondSC08-Regular.otf: EB Garamond SC,EB Garamond SC 08:style=08 Regular,Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
~/.local/share/fonts/EBGaramond12-AllSC.otf: EB Garamond 12 All SC:style=AllSC
~/.local/share/fonts/EBGaramond-Initials.otf: EB Garamond Initials:style=Regular


And this is how the font appears in fontmatrix:



Screenshot-Fontmatrix1.png



So, even if I have 10 .otf font files installed, I have only 6 entries in fontmatrix... So these entries here are I guess "font families", that is "EB Garamond" is one font family, "EB Garamond SC" is another?



This is what I get when I double-click the "EB Garamond" entry in fontmatrix:



Screenshot-Fontmatrix2.png



So, here I can see the entries (I guess) for EBGaramond08-Italic.otf, EBGaramond08-Regular.otf, EBGaramond12-Italic.otf, EBGaramond12-Regular.otf. And when I select the "08 Italic" button, I'm told that the current font is "EB Garamond 08 Italic".



I get something similar, when I click on "EB Garamond SC":



Screenshot-Fontmatrix3.png



The entries "08 Regular" and "12 Regular" probably represent EBGaramondSC08-Regular.otf and EBGaramondSC12-Regular.otf.



As a note, say LibreOffice Writes does not group these fonts, but each has a separate entry:



Screenshot-LibreOfficeWriter.png



Anyways, to repeat my question in other terms now: is there a way for setting up a newfontfamily, say titlenamefont, in fontspec, such that:




  • When {titlenamefont Huge{MYTEXT}} is used, the font rendered is "EB Garamond 12 Regular"

  • When {titlenamefont Hugebfseries{MYTEXT}} is used, the font rendered is "EB Garamond 08 Regular" (without generating warnings in latex log about nonexisting bold face)

  • When {titlenamefont Hugebfseries{textsc{MYTEXT}}} is used, the font rendered is a) either "EB Garamond 08 Regular" with Letters=SmallCaps option; or b) "EB Garamond SC 08 Regular"

  • When {titlenamefont Huge{textsc{MYTEXT}}} is used (so without bold), the font rendered is a) either "EB Garamond 12 Regular" with Letters=SmallCaps option; or b) "EB Garamond SC 12 Regular"


(Side question: in the above MWE, why does SmallCapsFeatures={Letters=SmallCaps} not generate any small caps with textsc, and just {Letters=SmallCaps} does?)







fonts fontspec ebgaramond






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 28 at 14:01









sdaau

9,076645126




9,076645126





bumped to the homepage by Community 30 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 30 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 3




    Sorry, but I don't understand why you want boldface Garamond: it's a crime against typography.
    – egreg
    Aug 28 at 17:34














  • 3




    Sorry, but I don't understand why you want boldface Garamond: it's a crime against typography.
    – egreg
    Aug 28 at 17:34








3




3




Sorry, but I don't understand why you want boldface Garamond: it's a crime against typography.
– egreg
Aug 28 at 17:34




Sorry, but I don't understand why you want boldface Garamond: it's a crime against typography.
– egreg
Aug 28 at 17:34










1 Answer
1






active

oldest

votes

















up vote
0
down vote













There’s a free version of the EB Garamond family on GitHub that comes in different weights. It’s based on EB Garamond 12, though, not 8. You can download regular, bold, italic and bold italic into your project directory or a subdirectory. Just Loading EB Garamond with the Path option to this subdirectory should work.



Then, create your font family using the Path, Scale, BoldFont, and BoldItalicFont options to newfontfamily. For example, [Scale = MatchUppercase, Ligatures = {Common, TeX}, BoldFont = EBGaramond08-bold.otf, BoldItalicFont = EBGaramond08-BoldItalic.otf] (If you have such fonts.) Use Scale=MatchUppercase to make the heights match, then whatever Ligatures, Numbers and other options you want. You might also need BoldFeatures and BoldItalicFeatures. If you’re loading the specific font files you downloaded into a directory yourself, you probably want to load them by filename with Extension = .otf.



If your copy of the bold font is recent, it should contain small caps already, and they should just work. If you need to load a separate font, you might need to set the BoldFeatures = { SmallCapsFont = ... } option as well.



There is a free version of a Garamond No8 with small caps at Arkandis.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f448151%2feb-garamond-and-fontspec-for-optical-bold-with-small-caps%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    There’s a free version of the EB Garamond family on GitHub that comes in different weights. It’s based on EB Garamond 12, though, not 8. You can download regular, bold, italic and bold italic into your project directory or a subdirectory. Just Loading EB Garamond with the Path option to this subdirectory should work.



    Then, create your font family using the Path, Scale, BoldFont, and BoldItalicFont options to newfontfamily. For example, [Scale = MatchUppercase, Ligatures = {Common, TeX}, BoldFont = EBGaramond08-bold.otf, BoldItalicFont = EBGaramond08-BoldItalic.otf] (If you have such fonts.) Use Scale=MatchUppercase to make the heights match, then whatever Ligatures, Numbers and other options you want. You might also need BoldFeatures and BoldItalicFeatures. If you’re loading the specific font files you downloaded into a directory yourself, you probably want to load them by filename with Extension = .otf.



    If your copy of the bold font is recent, it should contain small caps already, and they should just work. If you need to load a separate font, you might need to set the BoldFeatures = { SmallCapsFont = ... } option as well.



    There is a free version of a Garamond No8 with small caps at Arkandis.






    share|improve this answer



























      up vote
      0
      down vote













      There’s a free version of the EB Garamond family on GitHub that comes in different weights. It’s based on EB Garamond 12, though, not 8. You can download regular, bold, italic and bold italic into your project directory or a subdirectory. Just Loading EB Garamond with the Path option to this subdirectory should work.



      Then, create your font family using the Path, Scale, BoldFont, and BoldItalicFont options to newfontfamily. For example, [Scale = MatchUppercase, Ligatures = {Common, TeX}, BoldFont = EBGaramond08-bold.otf, BoldItalicFont = EBGaramond08-BoldItalic.otf] (If you have such fonts.) Use Scale=MatchUppercase to make the heights match, then whatever Ligatures, Numbers and other options you want. You might also need BoldFeatures and BoldItalicFeatures. If you’re loading the specific font files you downloaded into a directory yourself, you probably want to load them by filename with Extension = .otf.



      If your copy of the bold font is recent, it should contain small caps already, and they should just work. If you need to load a separate font, you might need to set the BoldFeatures = { SmallCapsFont = ... } option as well.



      There is a free version of a Garamond No8 with small caps at Arkandis.






      share|improve this answer

























        up vote
        0
        down vote










        up vote
        0
        down vote









        There’s a free version of the EB Garamond family on GitHub that comes in different weights. It’s based on EB Garamond 12, though, not 8. You can download regular, bold, italic and bold italic into your project directory or a subdirectory. Just Loading EB Garamond with the Path option to this subdirectory should work.



        Then, create your font family using the Path, Scale, BoldFont, and BoldItalicFont options to newfontfamily. For example, [Scale = MatchUppercase, Ligatures = {Common, TeX}, BoldFont = EBGaramond08-bold.otf, BoldItalicFont = EBGaramond08-BoldItalic.otf] (If you have such fonts.) Use Scale=MatchUppercase to make the heights match, then whatever Ligatures, Numbers and other options you want. You might also need BoldFeatures and BoldItalicFeatures. If you’re loading the specific font files you downloaded into a directory yourself, you probably want to load them by filename with Extension = .otf.



        If your copy of the bold font is recent, it should contain small caps already, and they should just work. If you need to load a separate font, you might need to set the BoldFeatures = { SmallCapsFont = ... } option as well.



        There is a free version of a Garamond No8 with small caps at Arkandis.






        share|improve this answer














        There’s a free version of the EB Garamond family on GitHub that comes in different weights. It’s based on EB Garamond 12, though, not 8. You can download regular, bold, italic and bold italic into your project directory or a subdirectory. Just Loading EB Garamond with the Path option to this subdirectory should work.



        Then, create your font family using the Path, Scale, BoldFont, and BoldItalicFont options to newfontfamily. For example, [Scale = MatchUppercase, Ligatures = {Common, TeX}, BoldFont = EBGaramond08-bold.otf, BoldItalicFont = EBGaramond08-BoldItalic.otf] (If you have such fonts.) Use Scale=MatchUppercase to make the heights match, then whatever Ligatures, Numbers and other options you want. You might also need BoldFeatures and BoldItalicFeatures. If you’re loading the specific font files you downloaded into a directory yourself, you probably want to load them by filename with Extension = .otf.



        If your copy of the bold font is recent, it should contain small caps already, and they should just work. If you need to load a separate font, you might need to set the BoldFeatures = { SmallCapsFont = ... } option as well.



        There is a free version of a Garamond No8 with small caps at Arkandis.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Aug 31 at 4:51

























        answered Aug 31 at 2:54









        Davislor

        4,122820




        4,122820






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f448151%2feb-garamond-and-fontspec-for-optical-bold-with-small-caps%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

            Calculate evaluation metrics using cross_val_predict sklearn

            Insert data from modal to MySQL (multiple modal on website)