From 505d978cc30863a8ecfecf281c43ecf6982fb97a Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Sun, 9 Feb 2020 11:28:36 +0100
Subject: load the default Arabic font with luaotfload

---
 arabluatex.dtx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'arabluatex.dtx')

diff --git a/arabluatex.dtx b/arabluatex.dtx
index efc5d70..5e531a0 100644
--- a/arabluatex.dtx
+++ b/arabluatex.dtx
@@ -4328,7 +4328,7 @@
 \RequirePackage{luacolor}
 \RequirePackage{etoolbox}
 \RequirePackage{arabluatex-patch}
-\RequirePackage{fontspec}
+\RequirePackage{luaotfload}
 \RequirePackage{luacode}
 \RequirePackage{xparse}
 \RequirePackage{adjustbox}
@@ -4348,9 +4348,10 @@
 % and attempt to load the Amiri font which is included in \TeX{}live:
 %    \begin{macrocode}
 \AtBeginDocument{\ifdefined\arabicfont\relax\else
-\PackageWarning{arabluatex}{\string\arabicfont\ is not defined.^^J
-  I will try to load Amiri}%
-\newfontfamily\arabicfont[Script=Arabic]{Amiri}\fi}%
+  \PackageInfo{arabluatex}{%
+    \string\arabicfont\ is not defined.\MessageBreak
+    arabluatex will try to load Amiri}%
+  \font \arabicfont = {name:Amiri:script=arab} at \f@size pt\fi}%
 %    \end{macrocode}
 % \begin{macro}{\setRL}
 %   This neutralizes what may be defined by other packages:
-- 
cgit v1.2.3

