summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/xepersian/fontspec-xepersian.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian/fontspec-xepersian.def')
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/fontspec-xepersian.def20
1 files changed, 14 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/fontspec-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/fontspec-xepersian.def
index 5ce8cd756aa..f1e0ec12bea 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/fontspec-xepersian.def
+++ b/Master/texmf-dist/tex/xelatex/xepersian/fontspec-xepersian.def
@@ -17,7 +17,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{10898}
+%% \CheckSum{10904}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -34,7 +34,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{fontspec-xepersian.def}[2018/11/23 v0.1 fontspec changes]
+\ProvidesFile{fontspec-xepersian.def}[2018/11/26 v0.2 fontspec changes]
\ExplSyntaxOn
\cs_new:Npn \__xepersian_error:nx { \msg_error:nnx {xepersian} }
\char_set_catcode_space:n {32}
@@ -48,9 +48,9 @@
Select another font and rerun "xelatex".
}
\char_set_catcode_ignore:n {32}
-\prg_set_conditional:Nnn \__xepersian_font_if_cannot_be_loaded:N {p,TF,T,F}
+\prg_new_conditional:Nnn \__xepersian_font_if_cannot_be_loaded:Nn {p,TF,T,F}
{
- \str_if_in:NnTF { #1 } { HM }
+ \str_if_in:NnTF { #1 } { #2 }
{
\prg_return_true:
}
@@ -64,7 +64,11 @@
\__fontspec_primitive_font_set:Nnn \l_fontspec_font
{ \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f@size pt}
\__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {\l__fontspec_fontname_up_tl} }
- \__xepersian_font_if_cannot_be_loaded:NT \l__fontspec_fontname_up_tl { \__xepersian_error:nx {font-cannot-be-loaded} {\l__fontspec_fontname_up_tl} }
+ \__xepersian_font_if_cannot_be_loaded:NnT \l__fontspec_fontname_up_tl { HM }
+ {
+ \__xepersian_error:nx {font-cannot-be-loaded} {\l__fontspec_fontname_up_tl}
+ \cs_gset_eq:NN \l__fontspec_fontname_up_tl \tex_nullfont:D
+ }
\__fontspec_set_font_type:N \l_fontspec_font
\__fontspec_primitive_font_gset:Nnn \l_fontspec_font
{ \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f@size pt}
@@ -79,7 +83,11 @@
\keys_set_groups:nnV {fontspec/fontname} {getfontname} \l__fontspec_fontopts_clist
\__fontspec_primitive_font_set:Nnn \l_fontspec_font { \__fontspec_construct_font_call:nn {\l_fontspec_fontname_tl} {} } {\f@size pt}
\__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {#1} }
- \__xepersian_font_if_cannot_be_loaded:NT #1 { \__xepersian_error:nx {font-cannot-be-loaded} {#1} }
+ \__xepersian_font_if_cannot_be_loaded:NnT #1 { HM }
+ {
+ \__xepersian_error:nx {font-cannot-be-loaded} {#1}
+ \cs_gset_eq:NN \l_fontspec_font \tex_nullfont:D
+ }
}
\ExplSyntaxOff
\endinput