What is a direct way of specifying a font family in XeLatex and how do you know what the “name” of the...
up vote
3
down vote
favorite
This question replaces my previous, unclear, question.
I want to use OTF fonts in XeLatex. To be concrete, here, for example, are some of the Linux Libertine fonts/fontfamilies available on my computer:
(Serif)
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_R.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_RB.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_RBO.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_RI.otf
.....
(Sans Serif)
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_R.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_I.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_M.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_MB.otf
....
Suppose that I want to use to able to use all of LinLibertine fonts; roman, italics etc without defining rm, it individually. Is there a simple command(s) to do this? Can one do this for both LinLibertine (serif) and LinBiolinum (sans serif) at once. I was unable to find a suitable answer to what surely is a fundamental question.
What "name" does one use in such a command and how does one know what the "name" is. In the above example is it libertine or LinLibertine or an abbreviation (such as "cm") and does the "name" have capitals?
fonts
add a comment |
up vote
3
down vote
favorite
This question replaces my previous, unclear, question.
I want to use OTF fonts in XeLatex. To be concrete, here, for example, are some of the Linux Libertine fonts/fontfamilies available on my computer:
(Serif)
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_R.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_RB.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_RBO.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_RI.otf
.....
(Sans Serif)
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_R.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_I.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_M.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_MB.otf
....
Suppose that I want to use to able to use all of LinLibertine fonts; roman, italics etc without defining rm, it individually. Is there a simple command(s) to do this? Can one do this for both LinLibertine (serif) and LinBiolinum (sans serif) at once. I was unable to find a suitable answer to what surely is a fundamental question.
What "name" does one use in such a command and how does one know what the "name" is. In the above example is it libertine or LinLibertine or an abbreviation (such as "cm") and does the "name" have capitals?
fonts
usepackage{libertine}
and everything should be fine.
– Herbert
Nov 20 at 21:29
1
Thefontspec
manual has lots of examples of how you can set things up how you want them easily.
– David Purton
Nov 21 at 6:21
Please clarify what you mean by “direct way”. The fonts provided in your question are included in Tex Live (so any computer that has TeX Live with fonts installed, not just your computer). Do you consider that relevant?
– Jonathan Komar
2 days ago
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
This question replaces my previous, unclear, question.
I want to use OTF fonts in XeLatex. To be concrete, here, for example, are some of the Linux Libertine fonts/fontfamilies available on my computer:
(Serif)
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_R.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_RB.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_RBO.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_RI.otf
.....
(Sans Serif)
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_R.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_I.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_M.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_MB.otf
....
Suppose that I want to use to able to use all of LinLibertine fonts; roman, italics etc without defining rm, it individually. Is there a simple command(s) to do this? Can one do this for both LinLibertine (serif) and LinBiolinum (sans serif) at once. I was unable to find a suitable answer to what surely is a fundamental question.
What "name" does one use in such a command and how does one know what the "name" is. In the above example is it libertine or LinLibertine or an abbreviation (such as "cm") and does the "name" have capitals?
fonts
This question replaces my previous, unclear, question.
I want to use OTF fonts in XeLatex. To be concrete, here, for example, are some of the Linux Libertine fonts/fontfamilies available on my computer:
(Serif)
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_R.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_RB.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_RBO.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinBiolinum_RI.otf
.....
(Sans Serif)
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_R.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_I.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_M.otf
/usr/share/texmf-dist/fonts/opentype/public/libertine/LinLibertine_MB.otf
....
Suppose that I want to use to able to use all of LinLibertine fonts; roman, italics etc without defining rm, it individually. Is there a simple command(s) to do this? Can one do this for both LinLibertine (serif) and LinBiolinum (sans serif) at once. I was unable to find a suitable answer to what surely is a fundamental question.
What "name" does one use in such a command and how does one know what the "name" is. In the above example is it libertine or LinLibertine or an abbreviation (such as "cm") and does the "name" have capitals?
fonts
fonts
edited Nov 20 at 21:28
Herbert
265k23403712
265k23403712
asked Nov 20 at 21:20
morris roger
612
612
usepackage{libertine}
and everything should be fine.
– Herbert
Nov 20 at 21:29
1
Thefontspec
manual has lots of examples of how you can set things up how you want them easily.
– David Purton
Nov 21 at 6:21
Please clarify what you mean by “direct way”. The fonts provided in your question are included in Tex Live (so any computer that has TeX Live with fonts installed, not just your computer). Do you consider that relevant?
– Jonathan Komar
2 days ago
add a comment |
usepackage{libertine}
and everything should be fine.
– Herbert
Nov 20 at 21:29
1
Thefontspec
manual has lots of examples of how you can set things up how you want them easily.
– David Purton
Nov 21 at 6:21
Please clarify what you mean by “direct way”. The fonts provided in your question are included in Tex Live (so any computer that has TeX Live with fonts installed, not just your computer). Do you consider that relevant?
– Jonathan Komar
2 days ago
usepackage{libertine}
and everything should be fine.– Herbert
Nov 20 at 21:29
usepackage{libertine}
and everything should be fine.– Herbert
Nov 20 at 21:29
1
1
The
fontspec
manual has lots of examples of how you can set things up how you want them easily.– David Purton
Nov 21 at 6:21
The
fontspec
manual has lots of examples of how you can set things up how you want them easily.– David Purton
Nov 21 at 6:21
Please clarify what you mean by “direct way”. The fonts provided in your question are included in Tex Live (so any computer that has TeX Live with fonts installed, not just your computer). Do you consider that relevant?
– Jonathan Komar
2 days ago
Please clarify what you mean by “direct way”. The fonts provided in your question are included in Tex Live (so any computer that has TeX Live with fonts installed, not just your computer). Do you consider that relevant?
– Jonathan Komar
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
First things first, xelatex
has one mandatory package to make use of other fonts (see texdoc fontspec
documentation)
usepackage{fontspec}
After that, it makes sense to define the font family name to be the part of the filename that is common across all styles (case sensitive).
In your case:
- LinBiolinum
- LinLibertine
Then after searching for font family in the fontspec documentation, you might think to create the two new font families like this:
Define n fonts newfontfamily
You define the command name but it makes sense to use semantically relevant names.
newfontfamilyLinBiolinum[%
Extension = .otf ,
UprightFont = *_R , % roman font style (segment of file path)
ItalicFont = *_RI , % italic font style (segment of file path)
BoldFont = *_RB , % bold font style (segment of file path)
]{LinBiolinum}
newfontfamilyLinLibertine[%
Extension = .otf ,
UprightFont = *_R ,
ItalicFont = *_I ,
BoldFont = *_MB ,
]{LinLibertine}
Then anytime you want to "activate" that font in your document, just call LinBiolinum
or LinLibertine
. You told fontspec how to load the different styles: bold, italic, regular:
rm = /path/LinLibertine_R.otf
it = /path/LinLibertine_RI.otf
etc.
However, fontspec
uses a few built-in font family commands. The one for the main font is called normalfont
, and can be manually set using setmainfont
like this:
setmainfont[%
Extension = .otf ,
UprightFont = *_R ,
ItalicFont = *_I ,
BoldFont = *_MB ,
]{LinLibertine}
The way these macros work are by loading fonts based on breaking font path segments into components so that some of them may be used as variables (UprightFont, ItalicFont, BoldFont, Extension, and others listed in the fontspec
documentation).
The /path/
segment is set as an environment variable. Each TeX Live Installation sets a few paths by default for its internal fonts.
cat $(kpsewhich -var-value TEXMFSYSVAR)/fonts/conf/texlive-fontconfig.conf
If you want to load a font from someplace other than those, you have two options
- Use the Path parameter in your font family definitions
- Add it to your path environment variable.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
First things first, xelatex
has one mandatory package to make use of other fonts (see texdoc fontspec
documentation)
usepackage{fontspec}
After that, it makes sense to define the font family name to be the part of the filename that is common across all styles (case sensitive).
In your case:
- LinBiolinum
- LinLibertine
Then after searching for font family in the fontspec documentation, you might think to create the two new font families like this:
Define n fonts newfontfamily
You define the command name but it makes sense to use semantically relevant names.
newfontfamilyLinBiolinum[%
Extension = .otf ,
UprightFont = *_R , % roman font style (segment of file path)
ItalicFont = *_RI , % italic font style (segment of file path)
BoldFont = *_RB , % bold font style (segment of file path)
]{LinBiolinum}
newfontfamilyLinLibertine[%
Extension = .otf ,
UprightFont = *_R ,
ItalicFont = *_I ,
BoldFont = *_MB ,
]{LinLibertine}
Then anytime you want to "activate" that font in your document, just call LinBiolinum
or LinLibertine
. You told fontspec how to load the different styles: bold, italic, regular:
rm = /path/LinLibertine_R.otf
it = /path/LinLibertine_RI.otf
etc.
However, fontspec
uses a few built-in font family commands. The one for the main font is called normalfont
, and can be manually set using setmainfont
like this:
setmainfont[%
Extension = .otf ,
UprightFont = *_R ,
ItalicFont = *_I ,
BoldFont = *_MB ,
]{LinLibertine}
The way these macros work are by loading fonts based on breaking font path segments into components so that some of them may be used as variables (UprightFont, ItalicFont, BoldFont, Extension, and others listed in the fontspec
documentation).
The /path/
segment is set as an environment variable. Each TeX Live Installation sets a few paths by default for its internal fonts.
cat $(kpsewhich -var-value TEXMFSYSVAR)/fonts/conf/texlive-fontconfig.conf
If you want to load a font from someplace other than those, you have two options
- Use the Path parameter in your font family definitions
- Add it to your path environment variable.
add a comment |
up vote
2
down vote
First things first, xelatex
has one mandatory package to make use of other fonts (see texdoc fontspec
documentation)
usepackage{fontspec}
After that, it makes sense to define the font family name to be the part of the filename that is common across all styles (case sensitive).
In your case:
- LinBiolinum
- LinLibertine
Then after searching for font family in the fontspec documentation, you might think to create the two new font families like this:
Define n fonts newfontfamily
You define the command name but it makes sense to use semantically relevant names.
newfontfamilyLinBiolinum[%
Extension = .otf ,
UprightFont = *_R , % roman font style (segment of file path)
ItalicFont = *_RI , % italic font style (segment of file path)
BoldFont = *_RB , % bold font style (segment of file path)
]{LinBiolinum}
newfontfamilyLinLibertine[%
Extension = .otf ,
UprightFont = *_R ,
ItalicFont = *_I ,
BoldFont = *_MB ,
]{LinLibertine}
Then anytime you want to "activate" that font in your document, just call LinBiolinum
or LinLibertine
. You told fontspec how to load the different styles: bold, italic, regular:
rm = /path/LinLibertine_R.otf
it = /path/LinLibertine_RI.otf
etc.
However, fontspec
uses a few built-in font family commands. The one for the main font is called normalfont
, and can be manually set using setmainfont
like this:
setmainfont[%
Extension = .otf ,
UprightFont = *_R ,
ItalicFont = *_I ,
BoldFont = *_MB ,
]{LinLibertine}
The way these macros work are by loading fonts based on breaking font path segments into components so that some of them may be used as variables (UprightFont, ItalicFont, BoldFont, Extension, and others listed in the fontspec
documentation).
The /path/
segment is set as an environment variable. Each TeX Live Installation sets a few paths by default for its internal fonts.
cat $(kpsewhich -var-value TEXMFSYSVAR)/fonts/conf/texlive-fontconfig.conf
If you want to load a font from someplace other than those, you have two options
- Use the Path parameter in your font family definitions
- Add it to your path environment variable.
add a comment |
up vote
2
down vote
up vote
2
down vote
First things first, xelatex
has one mandatory package to make use of other fonts (see texdoc fontspec
documentation)
usepackage{fontspec}
After that, it makes sense to define the font family name to be the part of the filename that is common across all styles (case sensitive).
In your case:
- LinBiolinum
- LinLibertine
Then after searching for font family in the fontspec documentation, you might think to create the two new font families like this:
Define n fonts newfontfamily
You define the command name but it makes sense to use semantically relevant names.
newfontfamilyLinBiolinum[%
Extension = .otf ,
UprightFont = *_R , % roman font style (segment of file path)
ItalicFont = *_RI , % italic font style (segment of file path)
BoldFont = *_RB , % bold font style (segment of file path)
]{LinBiolinum}
newfontfamilyLinLibertine[%
Extension = .otf ,
UprightFont = *_R ,
ItalicFont = *_I ,
BoldFont = *_MB ,
]{LinLibertine}
Then anytime you want to "activate" that font in your document, just call LinBiolinum
or LinLibertine
. You told fontspec how to load the different styles: bold, italic, regular:
rm = /path/LinLibertine_R.otf
it = /path/LinLibertine_RI.otf
etc.
However, fontspec
uses a few built-in font family commands. The one for the main font is called normalfont
, and can be manually set using setmainfont
like this:
setmainfont[%
Extension = .otf ,
UprightFont = *_R ,
ItalicFont = *_I ,
BoldFont = *_MB ,
]{LinLibertine}
The way these macros work are by loading fonts based on breaking font path segments into components so that some of them may be used as variables (UprightFont, ItalicFont, BoldFont, Extension, and others listed in the fontspec
documentation).
The /path/
segment is set as an environment variable. Each TeX Live Installation sets a few paths by default for its internal fonts.
cat $(kpsewhich -var-value TEXMFSYSVAR)/fonts/conf/texlive-fontconfig.conf
If you want to load a font from someplace other than those, you have two options
- Use the Path parameter in your font family definitions
- Add it to your path environment variable.
First things first, xelatex
has one mandatory package to make use of other fonts (see texdoc fontspec
documentation)
usepackage{fontspec}
After that, it makes sense to define the font family name to be the part of the filename that is common across all styles (case sensitive).
In your case:
- LinBiolinum
- LinLibertine
Then after searching for font family in the fontspec documentation, you might think to create the two new font families like this:
Define n fonts newfontfamily
You define the command name but it makes sense to use semantically relevant names.
newfontfamilyLinBiolinum[%
Extension = .otf ,
UprightFont = *_R , % roman font style (segment of file path)
ItalicFont = *_RI , % italic font style (segment of file path)
BoldFont = *_RB , % bold font style (segment of file path)
]{LinBiolinum}
newfontfamilyLinLibertine[%
Extension = .otf ,
UprightFont = *_R ,
ItalicFont = *_I ,
BoldFont = *_MB ,
]{LinLibertine}
Then anytime you want to "activate" that font in your document, just call LinBiolinum
or LinLibertine
. You told fontspec how to load the different styles: bold, italic, regular:
rm = /path/LinLibertine_R.otf
it = /path/LinLibertine_RI.otf
etc.
However, fontspec
uses a few built-in font family commands. The one for the main font is called normalfont
, and can be manually set using setmainfont
like this:
setmainfont[%
Extension = .otf ,
UprightFont = *_R ,
ItalicFont = *_I ,
BoldFont = *_MB ,
]{LinLibertine}
The way these macros work are by loading fonts based on breaking font path segments into components so that some of them may be used as variables (UprightFont, ItalicFont, BoldFont, Extension, and others listed in the fontspec
documentation).
The /path/
segment is set as an environment variable. Each TeX Live Installation sets a few paths by default for its internal fonts.
cat $(kpsewhich -var-value TEXMFSYSVAR)/fonts/conf/texlive-fontconfig.conf
If you want to load a font from someplace other than those, you have two options
- Use the Path parameter in your font family definitions
- Add it to your path environment variable.
edited Nov 23 at 6:21
answered Nov 22 at 12:03
Jonathan Komar
6,44632977
6,44632977
add a comment |
add a comment |
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%2f461027%2fwhat-is-a-direct-way-of-specifying-a-font-family-in-xelatex-and-how-do-you-know%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
usepackage{libertine}
and everything should be fine.– Herbert
Nov 20 at 21:29
1
The
fontspec
manual has lots of examples of how you can set things up how you want them easily.– David Purton
Nov 21 at 6:21
Please clarify what you mean by “direct way”. The fonts provided in your question are included in Tex Live (so any computer that has TeX Live with fonts installed, not just your computer). Do you consider that relevant?
– Jonathan Komar
2 days ago