diff options
author | Karl Berry <karl@freefriends.org> | 2010-07-17 23:23:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-07-17 23:23:18 +0000 |
commit | 306b4622046e852e3a6d1a44b180adc65d5b2bdf (patch) | |
tree | 5629332acdda731ff35d5d94593e737b0f95cc20 /Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf | |
parent | 59346cd52c590f5aea686f78841e398040656feb (diff) |
polyglossia update (17jul10)
git-svn-id: svn://tug.org/texlive/trunk@19504 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf | 61 |
1 files changed, 24 insertions, 37 deletions
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf index 7a51a04c82e..e974fc45489 100644 --- a/Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf +++ b/Master/texmf-dist/tex/xelatex/polyglossia/gloss-thai.ldf @@ -9,14 +9,22 @@ %%%% Thai Linux Working Group %%%% http://linux.thai.net/ %%%% +\PolyglossiaSetup{thai}{ + script=Thai, + scripttag=thai, + hyphennames={nohyphenation}, + fontsetup=true + %TODO localalph={xxx@alph,xxx@Alph} + %TODO localdigits=thainumber +} \newif\if@thai@numerals \def\tmp@thai{thai} \define@key{thai}{numerals}[arabic]{% \def\@tmpa{#1}% - \ifx\@tmpa\tmp@thai\@thai@numeralstrue\else% - \@thai@numeralsfalse\fi% - } + \ifx\@tmpa\tmp@thai\@thai@numeralstrue\else + \@thai@numeralsfalse\fi +} \setkeys{thai}{numerals} @@ -43,7 +51,7 @@ \def\headtoname{เรียน}% \def\proofname{พิสูจน์}% %\def\glossaryname{}% - } +} \def\datethai{% \def\thai@month{% \ifcase\month\or @@ -54,7 +62,7 @@ \thai@year=\year% \advance\thai@year by 543% \def\today{\thainumber\day \space \thai@month\space พ.ศ.~\thainumber\thai@year}% - } +} %NB: thai-latex had "plus 0.6pt", but .4em appears to give better results % FIXME to avoid name clashes, rename \wbr to \wordbreak or \thaiworkbreak ? @@ -72,10 +80,10 @@ } \def\thainumber#1{% - \if@thai@numerals% + \if@thai@numerals \thaidigits{\number#1}% %%{\protect\addfontfeature{Mapping=thaidigits}\protect\number#1} - \else% + \else \number#1% %%{\protect\reset@font\number#1} \fi} @@ -95,57 +103,36 @@ \def\thai@numbers{% \let\@latinalph\@alph% \let\@latinAlph\@Alph% - \if@thai@numerals% + \if@thai@numerals \let\@alph\@thaialph% \let\@Alph\@thaiAlph% \fi - } +} \def\nothai@numbers{% \let\@alph\@latinalph% \let\@Alph\@latinAlph% - } +} \def\thai@globalnumbers{% \let\orig@arabic\@arabic% \let\@arabic\thainumber% \renewcommand{\thefootnote}{\protect\thainumber{\c@footnote}}% - } +} \def\nothai@globalnumbers{% \let\@arabic\orig@arabic% \renewcommand\thefootnote{\protect\number{\c@footnote}}% - } - -\def\thai@font{% - \@ifundefined{thaifont}{% - \normalfontlatin% - \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt - \zf@check@ot@script{thai}% - \if@tempswa - \addfontfeature{Script=Thai}% - \else - \PackageError{polyglossia}{^^J - The current font does not contain the Thai script!^^J - Please define \string\thaifont\space with \string\newfontfamily}% - \fi}% - {\thaifont}% } -\def\selectnormalfontthai{% - \let\normalfont=\thai@font% - \let\rmfamily=\thai@font% - \let\sffamily=\thai@font% - \let\ttfamily=\thai@font% - \def\reset@font{\normalfont}} - -\def\thai@language{\language=\l@nohyphenation} - \def\blockextras@thai{% +%%TODO \XeTeXlinebreaklocales "th"% uses ICU to find line breaks on the basis of a dictionary lookup-- make this optional? (in case a user might prefer a preprocessor \let\orig@baselinestrech\baselinestretch% \renewcommand{\baselinestretch}{1.2}% - } +} \def\noblockextras@thai{% +%%TODO \XeTeXlinebreaklocales "en"% \let\baselinestrech\orig@baselinestretch% - } +} + \endinput %TODO ? |