Where and how does fontspec.sty specify the default font (Latin Modern Roman)?












3















When doing usepackage{fontspec}, where and how is the default font name specified?



On my TeX Live 2019, I see this font filename on the console log of the lualatex compilation: /usr/share/texmf/fonts/opentype/public/lm/lmroman10-regular.otf. Where is it configured?



FYI I wasn't able to find anything useful by eyeballing the output of grep -iE 'lmodern|latin.?modern' $(dpkg -L texlive-latex-recommended texlive-latex-base texlive-luatex) 2>/dev/null.










share|improve this question























  • The default font is indeed Latin Modern.

    – Bernard
    4 hours ago











  • @Bernard: I know that the default font is Latin Modern. I'm interested in which config file specifies it. Do you know?

    – pts
    4 hours ago






  • 1





    I thought you wondered which was the default font. As far as I understand LaTeX 3 code, it seems to be set in lines 475–477 of fontspec-luatex.sty and fontspec-xetex.sty.

    – Bernard
    4 hours ago






  • 1





    note that TU encoded latin modern is already the default in lualatex (since 2015) even before fontspec is loaded.

    – David Carlisle
    3 hours ago
















3















When doing usepackage{fontspec}, where and how is the default font name specified?



On my TeX Live 2019, I see this font filename on the console log of the lualatex compilation: /usr/share/texmf/fonts/opentype/public/lm/lmroman10-regular.otf. Where is it configured?



FYI I wasn't able to find anything useful by eyeballing the output of grep -iE 'lmodern|latin.?modern' $(dpkg -L texlive-latex-recommended texlive-latex-base texlive-luatex) 2>/dev/null.










share|improve this question























  • The default font is indeed Latin Modern.

    – Bernard
    4 hours ago











  • @Bernard: I know that the default font is Latin Modern. I'm interested in which config file specifies it. Do you know?

    – pts
    4 hours ago






  • 1





    I thought you wondered which was the default font. As far as I understand LaTeX 3 code, it seems to be set in lines 475–477 of fontspec-luatex.sty and fontspec-xetex.sty.

    – Bernard
    4 hours ago






  • 1





    note that TU encoded latin modern is already the default in lualatex (since 2015) even before fontspec is loaded.

    – David Carlisle
    3 hours ago














3












3








3








When doing usepackage{fontspec}, where and how is the default font name specified?



On my TeX Live 2019, I see this font filename on the console log of the lualatex compilation: /usr/share/texmf/fonts/opentype/public/lm/lmroman10-regular.otf. Where is it configured?



FYI I wasn't able to find anything useful by eyeballing the output of grep -iE 'lmodern|latin.?modern' $(dpkg -L texlive-latex-recommended texlive-latex-base texlive-luatex) 2>/dev/null.










share|improve this question














When doing usepackage{fontspec}, where and how is the default font name specified?



On my TeX Live 2019, I see this font filename on the console log of the lualatex compilation: /usr/share/texmf/fonts/opentype/public/lm/lmroman10-regular.otf. Where is it configured?



FYI I wasn't able to find anything useful by eyeballing the output of grep -iE 'lmodern|latin.?modern' $(dpkg -L texlive-latex-recommended texlive-latex-base texlive-luatex) 2>/dev/null.







fonts fontspec default






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 4 hours ago









ptspts

451312




451312













  • The default font is indeed Latin Modern.

    – Bernard
    4 hours ago











  • @Bernard: I know that the default font is Latin Modern. I'm interested in which config file specifies it. Do you know?

    – pts
    4 hours ago






  • 1





    I thought you wondered which was the default font. As far as I understand LaTeX 3 code, it seems to be set in lines 475–477 of fontspec-luatex.sty and fontspec-xetex.sty.

    – Bernard
    4 hours ago






  • 1





    note that TU encoded latin modern is already the default in lualatex (since 2015) even before fontspec is loaded.

    – David Carlisle
    3 hours ago



















  • The default font is indeed Latin Modern.

    – Bernard
    4 hours ago











  • @Bernard: I know that the default font is Latin Modern. I'm interested in which config file specifies it. Do you know?

    – pts
    4 hours ago






  • 1





    I thought you wondered which was the default font. As far as I understand LaTeX 3 code, it seems to be set in lines 475–477 of fontspec-luatex.sty and fontspec-xetex.sty.

    – Bernard
    4 hours ago






  • 1





    note that TU encoded latin modern is already the default in lualatex (since 2015) even before fontspec is loaded.

    – David Carlisle
    3 hours ago

















The default font is indeed Latin Modern.

– Bernard
4 hours ago





The default font is indeed Latin Modern.

– Bernard
4 hours ago













@Bernard: I know that the default font is Latin Modern. I'm interested in which config file specifies it. Do you know?

– pts
4 hours ago





@Bernard: I know that the default font is Latin Modern. I'm interested in which config file specifies it. Do you know?

– pts
4 hours ago




1




1





I thought you wondered which was the default font. As far as I understand LaTeX 3 code, it seems to be set in lines 475–477 of fontspec-luatex.sty and fontspec-xetex.sty.

– Bernard
4 hours ago





I thought you wondered which was the default font. As far as I understand LaTeX 3 code, it seems to be set in lines 475–477 of fontspec-luatex.sty and fontspec-xetex.sty.

– Bernard
4 hours ago




1




1





note that TU encoded latin modern is already the default in lualatex (since 2015) even before fontspec is loaded.

– David Carlisle
3 hours ago





note that TU encoded latin modern is already the default in lualatex (since 2015) even before fontspec is loaded.

– David Carlisle
3 hours ago










1 Answer
1






active

oldest

votes


















4














The Latin Modern fonts are preloaded at format creation. If you look in



/usr/local/texlive/2018/texmf-var/web2c/xetex/xelatex.log


(the location may vary depending on the flavor of TeX Live you're using) you find



(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tuenc.def
File: tuenc.def 2018/08/11 v2.0j Standard LaTeX file
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmr.fd
File: tulmr.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmss.fd
File: tulmss.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmtt.fd
File: tulmtt.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)


Similarly for lualatex.log.



This is because if the engine is XeLaTeX or LuaLaTeX, the default encoding is set to TU and the default font family to lmr. The file tulmr.fd contains



DeclareFontFamily{TU}{lmr}{}
DeclareFontShape{TU}{lmr}{m}{n}%
{<-5.5> UnicodeFontFile{lmroman5-regular}{UnicodeFontTeXLigatures}
<5.5-6.5> UnicodeFontFile{lmroman6-regular}{UnicodeFontTeXLigatures}
<6.5-7.5> UnicodeFontFile{lmroman7-regular}{UnicodeFontTeXLigatures}
<7.5-8.5> UnicodeFontFile{lmroman8-regular}{UnicodeFontTeXLigatures}
<8.5-9.5> UnicodeFontFile{lmroman9-regular}{UnicodeFontTeXLigatures}
<9.5-11> UnicodeFontFile{lmroman10-regular}{UnicodeFontTeXLigatures}
<11-15> UnicodeFontFile{lmroman12-regular}{UnicodeFontTeXLigatures}
<15-> UnicodeFontFile{lmroman17-regular}{UnicodeFontTeXLigatures}
}{}


and other font definitions.



It's no longer a job for fontspec to define the standard fonts, as it used to be up to TeX Live 2015.






share|improve this answer
























  • Thank you for clarifying this! FYI my fontmath.cfg contains cmr fonts, but lmodern.sty specifies lmr for math as well. So running usepackage{lmodern} makes a difference: lmmi10.pfb will be used instead of cmmi10.pfb for math.

    – pts
    3 hours ago











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%2f470008%2fwhere-and-how-does-fontspec-sty-specify-the-default-font-latin-modern-roman%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









4














The Latin Modern fonts are preloaded at format creation. If you look in



/usr/local/texlive/2018/texmf-var/web2c/xetex/xelatex.log


(the location may vary depending on the flavor of TeX Live you're using) you find



(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tuenc.def
File: tuenc.def 2018/08/11 v2.0j Standard LaTeX file
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmr.fd
File: tulmr.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmss.fd
File: tulmss.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmtt.fd
File: tulmtt.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)


Similarly for lualatex.log.



This is because if the engine is XeLaTeX or LuaLaTeX, the default encoding is set to TU and the default font family to lmr. The file tulmr.fd contains



DeclareFontFamily{TU}{lmr}{}
DeclareFontShape{TU}{lmr}{m}{n}%
{<-5.5> UnicodeFontFile{lmroman5-regular}{UnicodeFontTeXLigatures}
<5.5-6.5> UnicodeFontFile{lmroman6-regular}{UnicodeFontTeXLigatures}
<6.5-7.5> UnicodeFontFile{lmroman7-regular}{UnicodeFontTeXLigatures}
<7.5-8.5> UnicodeFontFile{lmroman8-regular}{UnicodeFontTeXLigatures}
<8.5-9.5> UnicodeFontFile{lmroman9-regular}{UnicodeFontTeXLigatures}
<9.5-11> UnicodeFontFile{lmroman10-regular}{UnicodeFontTeXLigatures}
<11-15> UnicodeFontFile{lmroman12-regular}{UnicodeFontTeXLigatures}
<15-> UnicodeFontFile{lmroman17-regular}{UnicodeFontTeXLigatures}
}{}


and other font definitions.



It's no longer a job for fontspec to define the standard fonts, as it used to be up to TeX Live 2015.






share|improve this answer
























  • Thank you for clarifying this! FYI my fontmath.cfg contains cmr fonts, but lmodern.sty specifies lmr for math as well. So running usepackage{lmodern} makes a difference: lmmi10.pfb will be used instead of cmmi10.pfb for math.

    – pts
    3 hours ago
















4














The Latin Modern fonts are preloaded at format creation. If you look in



/usr/local/texlive/2018/texmf-var/web2c/xetex/xelatex.log


(the location may vary depending on the flavor of TeX Live you're using) you find



(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tuenc.def
File: tuenc.def 2018/08/11 v2.0j Standard LaTeX file
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmr.fd
File: tulmr.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmss.fd
File: tulmss.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmtt.fd
File: tulmtt.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)


Similarly for lualatex.log.



This is because if the engine is XeLaTeX or LuaLaTeX, the default encoding is set to TU and the default font family to lmr. The file tulmr.fd contains



DeclareFontFamily{TU}{lmr}{}
DeclareFontShape{TU}{lmr}{m}{n}%
{<-5.5> UnicodeFontFile{lmroman5-regular}{UnicodeFontTeXLigatures}
<5.5-6.5> UnicodeFontFile{lmroman6-regular}{UnicodeFontTeXLigatures}
<6.5-7.5> UnicodeFontFile{lmroman7-regular}{UnicodeFontTeXLigatures}
<7.5-8.5> UnicodeFontFile{lmroman8-regular}{UnicodeFontTeXLigatures}
<8.5-9.5> UnicodeFontFile{lmroman9-regular}{UnicodeFontTeXLigatures}
<9.5-11> UnicodeFontFile{lmroman10-regular}{UnicodeFontTeXLigatures}
<11-15> UnicodeFontFile{lmroman12-regular}{UnicodeFontTeXLigatures}
<15-> UnicodeFontFile{lmroman17-regular}{UnicodeFontTeXLigatures}
}{}


and other font definitions.



It's no longer a job for fontspec to define the standard fonts, as it used to be up to TeX Live 2015.






share|improve this answer
























  • Thank you for clarifying this! FYI my fontmath.cfg contains cmr fonts, but lmodern.sty specifies lmr for math as well. So running usepackage{lmodern} makes a difference: lmmi10.pfb will be used instead of cmmi10.pfb for math.

    – pts
    3 hours ago














4












4








4







The Latin Modern fonts are preloaded at format creation. If you look in



/usr/local/texlive/2018/texmf-var/web2c/xetex/xelatex.log


(the location may vary depending on the flavor of TeX Live you're using) you find



(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tuenc.def
File: tuenc.def 2018/08/11 v2.0j Standard LaTeX file
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmr.fd
File: tulmr.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmss.fd
File: tulmss.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmtt.fd
File: tulmtt.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)


Similarly for lualatex.log.



This is because if the engine is XeLaTeX or LuaLaTeX, the default encoding is set to TU and the default font family to lmr. The file tulmr.fd contains



DeclareFontFamily{TU}{lmr}{}
DeclareFontShape{TU}{lmr}{m}{n}%
{<-5.5> UnicodeFontFile{lmroman5-regular}{UnicodeFontTeXLigatures}
<5.5-6.5> UnicodeFontFile{lmroman6-regular}{UnicodeFontTeXLigatures}
<6.5-7.5> UnicodeFontFile{lmroman7-regular}{UnicodeFontTeXLigatures}
<7.5-8.5> UnicodeFontFile{lmroman8-regular}{UnicodeFontTeXLigatures}
<8.5-9.5> UnicodeFontFile{lmroman9-regular}{UnicodeFontTeXLigatures}
<9.5-11> UnicodeFontFile{lmroman10-regular}{UnicodeFontTeXLigatures}
<11-15> UnicodeFontFile{lmroman12-regular}{UnicodeFontTeXLigatures}
<15-> UnicodeFontFile{lmroman17-regular}{UnicodeFontTeXLigatures}
}{}


and other font definitions.



It's no longer a job for fontspec to define the standard fonts, as it used to be up to TeX Live 2015.






share|improve this answer













The Latin Modern fonts are preloaded at format creation. If you look in



/usr/local/texlive/2018/texmf-var/web2c/xetex/xelatex.log


(the location may vary depending on the flavor of TeX Live you're using) you find



(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tuenc.def
File: tuenc.def 2018/08/11 v2.0j Standard LaTeX file
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmr.fd
File: tulmr.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmss.fd
File: tulmss.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/tulmtt.fd
File: tulmtt.fd 2017/01/26 v1.8 Standard LaTeX font definitions for Latin Modern
)


Similarly for lualatex.log.



This is because if the engine is XeLaTeX or LuaLaTeX, the default encoding is set to TU and the default font family to lmr. The file tulmr.fd contains



DeclareFontFamily{TU}{lmr}{}
DeclareFontShape{TU}{lmr}{m}{n}%
{<-5.5> UnicodeFontFile{lmroman5-regular}{UnicodeFontTeXLigatures}
<5.5-6.5> UnicodeFontFile{lmroman6-regular}{UnicodeFontTeXLigatures}
<6.5-7.5> UnicodeFontFile{lmroman7-regular}{UnicodeFontTeXLigatures}
<7.5-8.5> UnicodeFontFile{lmroman8-regular}{UnicodeFontTeXLigatures}
<8.5-9.5> UnicodeFontFile{lmroman9-regular}{UnicodeFontTeXLigatures}
<9.5-11> UnicodeFontFile{lmroman10-regular}{UnicodeFontTeXLigatures}
<11-15> UnicodeFontFile{lmroman12-regular}{UnicodeFontTeXLigatures}
<15-> UnicodeFontFile{lmroman17-regular}{UnicodeFontTeXLigatures}
}{}


and other font definitions.



It's no longer a job for fontspec to define the standard fonts, as it used to be up to TeX Live 2015.







share|improve this answer












share|improve this answer



share|improve this answer










answered 3 hours ago









egregegreg

712k8618913175




712k8618913175













  • Thank you for clarifying this! FYI my fontmath.cfg contains cmr fonts, but lmodern.sty specifies lmr for math as well. So running usepackage{lmodern} makes a difference: lmmi10.pfb will be used instead of cmmi10.pfb for math.

    – pts
    3 hours ago



















  • Thank you for clarifying this! FYI my fontmath.cfg contains cmr fonts, but lmodern.sty specifies lmr for math as well. So running usepackage{lmodern} makes a difference: lmmi10.pfb will be used instead of cmmi10.pfb for math.

    – pts
    3 hours ago

















Thank you for clarifying this! FYI my fontmath.cfg contains cmr fonts, but lmodern.sty specifies lmr for math as well. So running usepackage{lmodern} makes a difference: lmmi10.pfb will be used instead of cmmi10.pfb for math.

– pts
3 hours ago





Thank you for clarifying this! FYI my fontmath.cfg contains cmr fonts, but lmodern.sty specifies lmr for math as well. So running usepackage{lmodern} makes a difference: lmmi10.pfb will be used instead of cmmi10.pfb for math.

– pts
3 hours ago


















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%2f470008%2fwhere-and-how-does-fontspec-sty-specify-the-default-font-latin-modern-roman%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

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

Eduardo VII do Reino Unido