summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/fonts/fonts-tlwg/latex/fonts-tlwg.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/fonts/fonts-tlwg/latex/fonts-tlwg.sty')
-rw-r--r--Master/texmf-dist/source/fonts/fonts-tlwg/latex/fonts-tlwg.sty59
1 files changed, 33 insertions, 26 deletions
diff --git a/Master/texmf-dist/source/fonts/fonts-tlwg/latex/fonts-tlwg.sty b/Master/texmf-dist/source/fonts/fonts-tlwg/latex/fonts-tlwg.sty
index fc14f324a95..242009ff21b 100644
--- a/Master/texmf-dist/source/fonts/fonts-tlwg/latex/fonts-tlwg.sty
+++ b/Master/texmf-dist/source/fonts/fonts-tlwg/latex/fonts-tlwg.sty
@@ -4,7 +4,7 @@
%
% Copyright (C) 1999 National Electronics and Computer Technology Center
% (NECTEC), Thailand. All rights reserved.
-%
+%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
@@ -12,13 +12,14 @@
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
-%
+%
% This work has the LPPL maintenance status "maintained".
-%
+%
% The Current Maintainer of this work is Theppitak Karoonboonyanan.
-%
+%
\ProvidesPackage{fonts-tlwg}[2014/07/05 v1.1 Thai TLWG Fonts]
+\RequirePackage{xkeyval}
\newcommand\thairmdefault{norasi}
\newcommand\thaisfdefault{garuda}
@@ -30,40 +31,45 @@
\newcommand{\thaifamilydefault}{\thairmdefault}
\newcommand{\englishfamilydefault}{\englishrmdefault}
+% Introduce scaled option
+\newcommand*{\fontstlwg@scale}{1}
+\DeclareOptionX{scale}{\renewcommand*{\fontstlwg@scale}{#1}}
+
% Use sans-serif font by default
-\DeclareOption{sans}{
+\DeclareOptionX{sans}{
\renewcommand{\thaifamilydefault}{\thaisfdefault}
\renewcommand{\englishfamilydefault}{\englishsfdefault}
}
% Set default roman, sans-serif, and teletype fonts
-\DeclareOption{rmkinnari}{\renewcommand{\thairmdefault}{kinnari}}
-\DeclareOption{rmnorasi}{\renewcommand{\thairmdefault}{norasi}}
-\DeclareOption{sfgaruda}{\renewcommand{\thaisfdefault}{garuda}}
-\DeclareOption{sflaksaman}{\renewcommand{\thaisfdefault}{laksaman}}
-\DeclareOption{sfumpush}{\renewcommand{\thaisfdefault}{umpush}}
-\DeclareOption{sfloma}{\renewcommand{\thaisfdefault}{loma}}
-\DeclareOption{sfwaree}{\renewcommand{\thaisfdefault}{waree}}
-\DeclareOption{ttttype}{\renewcommand{\thaittdefault}{ttype}}
-\DeclareOption{ttttypist}{\renewcommand{\thaittdefault}{ttypist}}
+\DeclareOptionX{rmkinnari}{\renewcommand{\thairmdefault}{kinnari}}
+\DeclareOptionX{rmnorasi}{\renewcommand{\thairmdefault}{norasi}}
+\DeclareOptionX{sfgaruda}{\renewcommand{\thaisfdefault}{garuda}}
+\DeclareOptionX{sflaksaman}{\renewcommand{\thaisfdefault}{laksaman}}
+\DeclareOptionX{sfumpush}{\renewcommand{\thaisfdefault}{umpush}}
+\DeclareOptionX{sfloma}{\renewcommand{\thaisfdefault}{loma}}
+\DeclareOptionX{sfwaree}{\renewcommand{\thaisfdefault}{waree}}
+\DeclareOptionX{ttttype}{\renewcommand{\thaittdefault}{ttype}}
+\DeclareOptionX{ttttypist}{\renewcommand{\thaittdefault}{ttypist}}
% Set default font
-\DeclareOption{kinnari}{\renewcommand{\thaifamilydefault}{kinnari}}
-\DeclareOption{garuda}{\renewcommand{\thaifamilydefault}{garuda}}
-\DeclareOption{norasi}{\renewcommand{\thaifamilydefault}{norasi}}
-\DeclareOption{laksaman}{\renewcommand{\thaifamilydefault}{laksaman}}
-\DeclareOption{loma}{\renewcommand{\thaifamilydefault}{loma}}
-\DeclareOption{purisa}{\renewcommand{\thaifamilydefault}{purisa}}
-\DeclareOption{sawasdee}{\renewcommand{\thaifamilydefault}{sawasdee}}
-\DeclareOption{ttype}{\renewcommand{\thaifamilydefault}{ttype}}
-\DeclareOption{ttypist}{\renewcommand{\thaifamilydefault}{ttypist}}
-\DeclareOption{umpush}{\renewcommand{\thaifamilydefault}{umpush}}
-\DeclareOption{waree}{\renewcommand{\thaifamilydefault}{waree}}
+\DeclareOptionX{kinnari}{\renewcommand{\thaifamilydefault}{kinnari}}
+\DeclareOptionX{garuda}{\renewcommand{\thaifamilydefault}{garuda}}
+\DeclareOptionX{norasi}{\renewcommand{\thaifamilydefault}{norasi}}
+\DeclareOptionX{laksaman}{\renewcommand{\thaifamilydefault}{laksaman}}
+\DeclareOptionX{loma}{\renewcommand{\thaifamilydefault}{loma}}
+\DeclareOptionX{purisa}{\renewcommand{\thaifamilydefault}{purisa}}
+\DeclareOptionX{sawasdee}{\renewcommand{\thaifamilydefault}{sawasdee}}
+\DeclareOptionX{ttype}{\renewcommand{\thaifamilydefault}{ttype}}
+\DeclareOptionX{ttypist}{\renewcommand{\thaifamilydefault}{ttypist}}
+\DeclareOptionX{umpush}{\renewcommand{\thaifamilydefault}{umpush}}
+\DeclareOptionX{waree}{\renewcommand{\thaifamilydefault}{waree}}
-\ProcessOptions\relax
+\ProcessOptionsX\relax
\DeclareRobustCommand{\thaitext}{%
\fontencoding{LTH}\fontfamily{\thaifamilydefault}\selectfont
+ \def\familydefault{\thaifamilydefault}%
\def\rmdefault{\thairmdefault}%
\def\sfdefault{\thaisfdefault}%
\def\ttdefault{\thaittdefault}%
@@ -71,6 +77,7 @@
\DeclareRobustCommand{\latintext}{%
\fontencoding{\latinencoding}\fontfamily{\englishfamilydefault}\selectfont
+ \def\familydefault{\englishfamilydefault}%
\def\rmdefault{\englishrmdefault}%
\def\sfdefault{\englishsfdefault}%
\def\ttdefault{\englishttdefault}%