EB Garamond, and fontspec for “optical bold” with small caps?Is there a way to use different local font...

Stop and Take a Breath!

Why was Germany not as successful as other Europeans in establishing overseas colonies?

How to verbalise code in Mathematica?

Controversial area of mathematics

Why don't other Westeros houses use wildfire?

Please, smoke with good manners

What makes accurate emulation of old systems a difficult task?

How could Tony Stark make this in Endgame?

Are Boeing 737-800’s grounded?

Is there any limitation with Arduino Nano serial communication distance?

A ​Note ​on ​N!

If a warlock with the Repelling Blast invocation casts Eldritch Blast and hits, must the targets always be pushed back?

Reducing vertical space in stackrel

Any examples of headwear for races with animal ears?

Will a top journal at least read my introduction?

What language was spoken in East Asia before Proto-Turkic?

Why does nature favour the Laplacian?

US visa is under administrative processing, I need the passport back ASAP

Was there a Viking Exchange as well as a Columbian one?

Why do Computer Science majors learn Calculus?

How did Captain America manage to do this?

Do I have an "anti-research" personality?

Does this extra sentence in the description of the warlock's Eyes of the Rune Keeper eldritch invocation appear in any official reference?

Pass By Reference VS Pass by Value



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


Is there a way to use different local font files for different font size in fontspec?How do I use EB Garamond 08?EB Garamond (bold) small caps “suddenly” unavailable in lualatex?Fake small caps with XeTeX/fontspec?Adobe Garamond Pro (otf) with mathdesignIs there a way to use different local font files for different font size in fontspec?How to choose fonts with different optical sizes with fontspecDifferences between XeLaTeX and LuaLaTeX embedding fonts (with optical sizes) in PDFFontspec: Bold Small Caps with Alegreya FontFontspec, bold small caps with ErewhonEB Garamond (bold) small caps “suddenly” unavailable in lualatex?luaotfload-tool can find fonts, but LuaLaTeX cannot find them to compileUse line numbers in text with EBGaramond-math and LuaTex













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 27 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 '18 at 17:34











  • Thank you for posting more information about what it is you want. My answer below doesn’t seem to meet your needs, but I’m not sure how to improve it. When you try loading the font you want to be the bold font with BoldFont =, and if you need a separate bold small caps, BoldFeatures = { SmallCapsFont = ... }, what happens?

    – Davislor
    Dec 29 '18 at 13:35


















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 27 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 '18 at 17:34











  • Thank you for posting more information about what it is you want. My answer below doesn’t seem to meet your needs, but I’m not sure how to improve it. When you try loading the font you want to be the bold font with BoldFont =, and if you need a separate bold small caps, BoldFeatures = { SmallCapsFont = ... }, what happens?

    – Davislor
    Dec 29 '18 at 13:35
















1












1








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 '18 at 14:01









sdaausdaau

9,214650131




9,214650131





bumped to the homepage by Community 27 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 27 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 '18 at 17:34











  • Thank you for posting more information about what it is you want. My answer below doesn’t seem to meet your needs, but I’m not sure how to improve it. When you try loading the font you want to be the bold font with BoldFont =, and if you need a separate bold small caps, BoldFeatures = { SmallCapsFont = ... }, what happens?

    – Davislor
    Dec 29 '18 at 13:35
















  • 3





    Sorry, but I don't understand why you want boldface Garamond: it's a crime against typography.

    – egreg
    Aug 28 '18 at 17:34











  • Thank you for posting more information about what it is you want. My answer below doesn’t seem to meet your needs, but I’m not sure how to improve it. When you try loading the font you want to be the bold font with BoldFont =, and if you need a separate bold small caps, BoldFeatures = { SmallCapsFont = ... }, what happens?

    – Davislor
    Dec 29 '18 at 13:35










3




3





Sorry, but I don't understand why you want boldface Garamond: it's a crime against typography.

– egreg
Aug 28 '18 at 17:34





Sorry, but I don't understand why you want boldface Garamond: it's a crime against typography.

– egreg
Aug 28 '18 at 17:34













Thank you for posting more information about what it is you want. My answer below doesn’t seem to meet your needs, but I’m not sure how to improve it. When you try loading the font you want to be the bold font with BoldFont =, and if you need a separate bold small caps, BoldFeatures = { SmallCapsFont = ... }, what happens?

– Davislor
Dec 29 '18 at 13:35







Thank you for posting more information about what it is you want. My answer below doesn’t seem to meet your needs, but I’m not sure how to improve it. When you try loading the font you want to be the bold font with BoldFont =, and if you need a separate bold small caps, BoldFeatures = { SmallCapsFont = ... }, what happens?

– Davislor
Dec 29 '18 at 13:35












1 Answer
1






active

oldest

votes


















0














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',
    autoActivateHeartbeat: false,
    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









    0














    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






























      0














      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




























        0












        0








        0







        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 '18 at 4:51

























        answered Aug 31 '18 at 2:54









        DavislorDavislor

        7,6691433




        7,6691433






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            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

            El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

            Castillo d'Acher Características Menú de navegación

            Connecting two nodes from the same mother node horizontallyTikZ: What EXACTLY does the the |- notation for...