Discussion:
[XeTeX] fontspec and fonts without certain styles
maxwell
2017-10-25 18:25:25 UTC
Permalink
For many of the fonts we use, there is no italic version (and in some
cases no bold). This is natural for Arabic and Thaana scripts, since
there is no tradition of italicizing them. (Nasta'liq is quite a
different sort of style...)

When I include a font loading command for one of these fonts, like--
\setmainfont[Script=Arabic]{Scheherazade}
or
\newfontfamily\naskhfont[Script=Arabic]{Scheherazade}
--fontspec outputs something that could be taken as a warning, but is
probably more like information:
Could not resolve font "Scheherazade/I" (it probably doesn't exist).

Is there a way to tell fontspec not to bother looking for an italicized
(or bold) version of particular fonts, and thereby prevent its
outputting this message? Adding the parameter
ItalicFeatures={}
(where the {} would normally enclose the path to a font file) does not
turn off the message.

I looked at the code for the \@@_find_autofonts macro in
fontspec-internal.dtx, but it did not enlighten me.

Maybe I should just not worry...

MWE follows my sig line.

Mike Maxwell
University of Maryland

-----------MWE---------
\documentclass{article}
\usepackage{fontspec}
\setmainfont[Script=Arabic]{Scheherazade}

\begin{document}
سلام
\end{document}


--------------------------------------------------
Subscriptions, Archive, and List information, e
Ulrike Fischer
2017-10-26 09:33:31 UTC
Permalink
Post by maxwell
For many of the fonts we use, there is no italic version (and in some
cases no bold). This is natural for Arabic and Thaana scripts, since
there is no tradition of italicizing them. (Nasta'liq is quite a
different sort of style...)
When I include a font loading command for one of these fonts, like--
\setmainfont[Script=Arabic]{Scheherazade}
or
\newfontfamily\naskhfont[Script=Arabic]{Scheherazade}
--fontspec outputs something that could be taken as a warning, but is
Could not resolve font "Scheherazade/I" (it probably doesn't exist).
Is there a way to tell fontspec not to bother looking for an italicized
(or bold) version of particular fonts, and thereby prevent its
outputting this message?
If you set the font explicitly the messages disappear:

\documentclass[a4paper, oneside]{book}
\usepackage{fontspec}


\setmainfont{Scheherazade}[Script=Arabic,ItalicFont=*,BoldFont=*,BoldItalicFont=*]

\begin{document}
ybc
\end{document}
--
Ulrike Fischer
http://www.troubleshooting-tex.de/



--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex
Mike Maxwell
2017-10-26 15:10:53 UTC
Permalink
Post by Ulrike Fischer
...
\setmainfont{Scheherazade}[Script=Arabic,ItalicFont=*,BoldFont=*,BoldItalicFont=*]
Thanks, that's the answer I needed!
--
Mike Maxwell
"My definition of an interesting universe is
one that has the capacity to study itself."
--Stephen Eastmond


--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex
RD Holkar
2017-10-27 05:42:13 UTC
Permalink
Thank you!
I had the same issue with the Devanagari fonts.

With best regards,
-Rohit.
Post by Ulrike Fischer
Post by maxwell
For many of the fonts we use, there is no italic version (and in some
cases no bold). This is natural for Arabic and Thaana scripts, since
there is no tradition of italicizing them. (Nasta'liq is quite a
different sort of style...)
When I include a font loading command for one of these fonts, like--
\setmainfont[Script=Arabic]{Scheherazade}
or
\newfontfamily\naskhfont[Script=Arabic]{Scheherazade}
--fontspec outputs something that could be taken as a warning, but is
Could not resolve font "Scheherazade/I" (it probably doesn't exist).
Is there a way to tell fontspec not to bother looking for an italicized
(or bold) version of particular fonts, and thereby prevent its
outputting this message?
\documentclass[a4paper, oneside]{book}
\usepackage{fontspec}
\setmainfont{Scheherazade}[Script=Arabic,ItalicFont=*,
BoldFont=*,BoldItalicFont=*]
\begin{document}
ybc
\end{document}
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
--------------------------------------------------
http://tug.org/mailman/listinfo/xetex
Loading...