How can my master.tex file find font files stored in a subfolder to my working directory?
up vote
3
down vote
favorite
I need to use the font Gotham Rounded, and have so far placed the eights font files (.otf) in my working folder, i.e. the folder containing my master.tex file. This works fine. When compiling my masterfile XeLatex produces a Pdf of my manuscript with the Gotham font.
However, if I move the eight font files to a subfolder ("myFonts") of my working folder, then XeLaTeX is not able to find them.
How do I tell XeLaTeX where I have placed my font files? Can I set the path to the font files somewhere, and how will the path look?
In my preable I have placed the following code for my font choise:
usepackage{fontspec}
% Gotham Rounded
setmainfont[
BoldFont=GothamRnd-Bold.otf,
ItalicFont=GothamRnd-LightIta.otf,
BoldItalicFont=GothamRnd-BoldIta.otf,
]{GothamRnd-Light.otf}
Thanks for any help!
fonts fontspec
add a comment |
up vote
3
down vote
favorite
I need to use the font Gotham Rounded, and have so far placed the eights font files (.otf) in my working folder, i.e. the folder containing my master.tex file. This works fine. When compiling my masterfile XeLatex produces a Pdf of my manuscript with the Gotham font.
However, if I move the eight font files to a subfolder ("myFonts") of my working folder, then XeLaTeX is not able to find them.
How do I tell XeLaTeX where I have placed my font files? Can I set the path to the font files somewhere, and how will the path look?
In my preable I have placed the following code for my font choise:
usepackage{fontspec}
% Gotham Rounded
setmainfont[
BoldFont=GothamRnd-Bold.otf,
ItalicFont=GothamRnd-LightIta.otf,
BoldItalicFont=GothamRnd-BoldIta.otf,
]{GothamRnd-Light.otf}
Thanks for any help!
fonts fontspec
1
Generally, addingPath=./myFonts/,
to the options should work
– egreg
Dec 4 at 21:36
Thanks. Where exactly do I add the string "Path =./myFonts/ " ?
– myotis
Dec 4 at 22:56
In the options tosetmainfont
– egreg
Dec 4 at 23:05
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I need to use the font Gotham Rounded, and have so far placed the eights font files (.otf) in my working folder, i.e. the folder containing my master.tex file. This works fine. When compiling my masterfile XeLatex produces a Pdf of my manuscript with the Gotham font.
However, if I move the eight font files to a subfolder ("myFonts") of my working folder, then XeLaTeX is not able to find them.
How do I tell XeLaTeX where I have placed my font files? Can I set the path to the font files somewhere, and how will the path look?
In my preable I have placed the following code for my font choise:
usepackage{fontspec}
% Gotham Rounded
setmainfont[
BoldFont=GothamRnd-Bold.otf,
ItalicFont=GothamRnd-LightIta.otf,
BoldItalicFont=GothamRnd-BoldIta.otf,
]{GothamRnd-Light.otf}
Thanks for any help!
fonts fontspec
I need to use the font Gotham Rounded, and have so far placed the eights font files (.otf) in my working folder, i.e. the folder containing my master.tex file. This works fine. When compiling my masterfile XeLatex produces a Pdf of my manuscript with the Gotham font.
However, if I move the eight font files to a subfolder ("myFonts") of my working folder, then XeLaTeX is not able to find them.
How do I tell XeLaTeX where I have placed my font files? Can I set the path to the font files somewhere, and how will the path look?
In my preable I have placed the following code for my font choise:
usepackage{fontspec}
% Gotham Rounded
setmainfont[
BoldFont=GothamRnd-Bold.otf,
ItalicFont=GothamRnd-LightIta.otf,
BoldItalicFont=GothamRnd-BoldIta.otf,
]{GothamRnd-Light.otf}
Thanks for any help!
fonts fontspec
fonts fontspec
asked Dec 4 at 21:23
myotis
4631314
4631314
1
Generally, addingPath=./myFonts/,
to the options should work
– egreg
Dec 4 at 21:36
Thanks. Where exactly do I add the string "Path =./myFonts/ " ?
– myotis
Dec 4 at 22:56
In the options tosetmainfont
– egreg
Dec 4 at 23:05
add a comment |
1
Generally, addingPath=./myFonts/,
to the options should work
– egreg
Dec 4 at 21:36
Thanks. Where exactly do I add the string "Path =./myFonts/ " ?
– myotis
Dec 4 at 22:56
In the options tosetmainfont
– egreg
Dec 4 at 23:05
1
1
Generally, adding
Path=./myFonts/,
to the options should work– egreg
Dec 4 at 21:36
Generally, adding
Path=./myFonts/,
to the options should work– egreg
Dec 4 at 21:36
Thanks. Where exactly do I add the string "Path =./myFonts/ " ?
– myotis
Dec 4 at 22:56
Thanks. Where exactly do I add the string "Path =./myFonts/ " ?
– myotis
Dec 4 at 22:56
In the options to
setmainfont
– egreg
Dec 4 at 23:05
In the options to
setmainfont
– egreg
Dec 4 at 23:05
add a comment |
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
Just add the path. I also recommend a clearer syntax.
usepackage{fontspec}
% Gotham Rounded
setmainfont{GothamRnd}[
Path=./MyFonts/,
Extension=.otf,
UprightFont=*-Light,
BoldFont=*-Bold,
ItalicFont=*-LightIta,
BoldItalicFont=*-BoldIta,
]
The *
stands for the main argument to setmainfont
.
Thanks a lot! I will test out your solution soon.
– myotis
Dec 4 at 23:12
It works perfect!
– myotis
Dec 5 at 9:11
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
Just add the path. I also recommend a clearer syntax.
usepackage{fontspec}
% Gotham Rounded
setmainfont{GothamRnd}[
Path=./MyFonts/,
Extension=.otf,
UprightFont=*-Light,
BoldFont=*-Bold,
ItalicFont=*-LightIta,
BoldItalicFont=*-BoldIta,
]
The *
stands for the main argument to setmainfont
.
Thanks a lot! I will test out your solution soon.
– myotis
Dec 4 at 23:12
It works perfect!
– myotis
Dec 5 at 9:11
add a comment |
up vote
4
down vote
accepted
Just add the path. I also recommend a clearer syntax.
usepackage{fontspec}
% Gotham Rounded
setmainfont{GothamRnd}[
Path=./MyFonts/,
Extension=.otf,
UprightFont=*-Light,
BoldFont=*-Bold,
ItalicFont=*-LightIta,
BoldItalicFont=*-BoldIta,
]
The *
stands for the main argument to setmainfont
.
Thanks a lot! I will test out your solution soon.
– myotis
Dec 4 at 23:12
It works perfect!
– myotis
Dec 5 at 9:11
add a comment |
up vote
4
down vote
accepted
up vote
4
down vote
accepted
Just add the path. I also recommend a clearer syntax.
usepackage{fontspec}
% Gotham Rounded
setmainfont{GothamRnd}[
Path=./MyFonts/,
Extension=.otf,
UprightFont=*-Light,
BoldFont=*-Bold,
ItalicFont=*-LightIta,
BoldItalicFont=*-BoldIta,
]
The *
stands for the main argument to setmainfont
.
Just add the path. I also recommend a clearer syntax.
usepackage{fontspec}
% Gotham Rounded
setmainfont{GothamRnd}[
Path=./MyFonts/,
Extension=.otf,
UprightFont=*-Light,
BoldFont=*-Bold,
ItalicFont=*-LightIta,
BoldItalicFont=*-BoldIta,
]
The *
stands for the main argument to setmainfont
.
answered Dec 4 at 23:07
egreg
704k8618753154
704k8618753154
Thanks a lot! I will test out your solution soon.
– myotis
Dec 4 at 23:12
It works perfect!
– myotis
Dec 5 at 9:11
add a comment |
Thanks a lot! I will test out your solution soon.
– myotis
Dec 4 at 23:12
It works perfect!
– myotis
Dec 5 at 9:11
Thanks a lot! I will test out your solution soon.
– myotis
Dec 4 at 23:12
Thanks a lot! I will test out your solution soon.
– myotis
Dec 4 at 23:12
It works perfect!
– myotis
Dec 5 at 9:11
It works perfect!
– myotis
Dec 5 at 9:11
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f463220%2fhow-can-my-master-tex-file-find-font-files-stored-in-a-subfolder-to-my-working-d%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
1
Generally, adding
Path=./myFonts/,
to the options should work– egreg
Dec 4 at 21:36
Thanks. Where exactly do I add the string "Path =./myFonts/ " ?
– myotis
Dec 4 at 22:56
In the options to
setmainfont
– egreg
Dec 4 at 23:05