Where and how does fontspec.sty specify the default font (Latin Modern Roman)?
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
add a comment |
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
The default font is indeed Latin Modern.
– Bernard
3 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
3 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 offontspec-luatex.sty
andfontspec-xetex.sty
.
– Bernard
3 hours ago
1
note that TU encoded latin modern is already the default in lualatex (since 2015) even before fontspec is loaded.
– David Carlisle
2 hours ago
add a comment |
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
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
fonts fontspec default
asked 3 hours ago
ptspts
451312
451312
The default font is indeed Latin Modern.
– Bernard
3 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
3 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 offontspec-luatex.sty
andfontspec-xetex.sty
.
– Bernard
3 hours ago
1
note that TU encoded latin modern is already the default in lualatex (since 2015) even before fontspec is loaded.
– David Carlisle
2 hours ago
add a comment |
The default font is indeed Latin Modern.
– Bernard
3 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
3 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 offontspec-luatex.sty
andfontspec-xetex.sty
.
– Bernard
3 hours ago
1
note that TU encoded latin modern is already the default in lualatex (since 2015) even before fontspec is loaded.
– David Carlisle
2 hours ago
The default font is indeed Latin Modern.
– Bernard
3 hours ago
The default font is indeed Latin Modern.
– Bernard
3 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
3 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
3 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
3 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
3 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
2 hours ago
note that TU encoded latin modern is already the default in lualatex (since 2015) even before fontspec is loaded.
– David Carlisle
2 hours ago
add a comment |
1 Answer
1
active
oldest
votes
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.
Thank you for clarifying this! FYI my fontmath.cfg containscmr
fonts, but lmodern.sty specifieslmr
for math as well. So runningusepackage{lmodern}
makes a difference:lmmi10.pfb
will be used instead ofcmmi10.pfb
for math.
– pts
2 hours ago
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Thank you for clarifying this! FYI my fontmath.cfg containscmr
fonts, but lmodern.sty specifieslmr
for math as well. So runningusepackage{lmodern}
makes a difference:lmmi10.pfb
will be used instead ofcmmi10.pfb
for math.
– pts
2 hours ago
add a comment |
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.
Thank you for clarifying this! FYI my fontmath.cfg containscmr
fonts, but lmodern.sty specifieslmr
for math as well. So runningusepackage{lmodern}
makes a difference:lmmi10.pfb
will be used instead ofcmmi10.pfb
for math.
– pts
2 hours ago
add a comment |
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.
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.
answered 2 hours ago
egregegreg
712k8618913175
712k8618913175
Thank you for clarifying this! FYI my fontmath.cfg containscmr
fonts, but lmodern.sty specifieslmr
for math as well. So runningusepackage{lmodern}
makes a difference:lmmi10.pfb
will be used instead ofcmmi10.pfb
for math.
– pts
2 hours ago
add a comment |
Thank you for clarifying this! FYI my fontmath.cfg containscmr
fonts, but lmodern.sty specifieslmr
for math as well. So runningusepackage{lmodern}
makes a difference:lmmi10.pfb
will be used instead ofcmmi10.pfb
for math.
– pts
2 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
2 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
2 hours ago
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
The default font is indeed Latin Modern.
– Bernard
3 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
3 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
andfontspec-xetex.sty
.– Bernard
3 hours ago
1
note that TU encoded latin modern is already the default in lualatex (since 2015) even before fontspec is loaded.
– David Carlisle
2 hours ago