commit 008e1cc963b5ca54f1e71fa501ecb4b2306349ff
Author: Scott Kostyshak <skost...@lyx.org>
Date:   Thu Aug 17 22:02:09 2023 -0400

    Fix font substitutions of Thai documents
    
    The substitutefont package is obsoleted now on TL because the
    required functionality is in the kernel. See here:
    
      https://ctan.org/pkg/substitutefont
---
 lib/languages |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/lib/languages b/lib/languages
index 3101ee3..760a1ff 100644
--- a/lib/languages
+++ b/lib/languages
@@ -1522,11 +1522,23 @@ Language thai
          \DeclareRobustCommand{\copyright}{%
            \ifmmode{\nfss@text{\textcopyright}}\else\textcopyright\fi}
          \DeclareTextSymbol{\textcopyright}{LTH}{8}
+         %
           % set up Thai fonts as substitue for the default families
-          \usepackage{substitutefont}
-          \substitutefont{LTH}{\rmdefault}{norasi}
-          \substitutefont{LTH}{\sfdefault}{garuda}
-          \substitutefont{LTH}{\ttdefault}{ttypist}
+         % The 'substitutefont' package is obsolete now, since commands
+         % from the LaTeX kernel can be used instead. See here:
+         %   https://ctan.org/pkg/substitutefont
+         %   https://www.latex-project.org/news/latex2e-news/ltnews31.pdf
+         \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
+         \IfFormatAtLeastTF{2020/02/01}{%
+           \DeclareFontFamilySubstitution{LTH}{\rmdefault}{norasi}
+           \DeclareFontFamilySubstitution{LTH}{\sfdefault}{garuda}
+           \DeclareFontFamilySubstitution{LTH}{\ttdefault}{ttypist}
+         }{%
+           \usepackage{substitutefont}
+           \substitutefont{LTH}{\rmdefault}{norasi}
+           \substitutefont{LTH}{\sfdefault}{garuda}
+           \substitutefont{LTH}{\ttdefault}{ttypist}
+         }
        EndPostBabelPreamble
 End
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to