Cscott has uploaded a new change for review.
https://gerrit.wikimedia.org/r/159192
Change subject: WIP: indic languages fixes
......................................................................
WIP: indic languages fixes
Change-Id: I2decf7ad5586f16c7429048a9c46463503f33b5e
---
M lib/index.js
M lib/polyglossia.js
M tex/gloss-chinese.ldf
3 files changed, 19 insertions(+), 8 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
refs/changes/92/159192/1
diff --git a/lib/index.js b/lib/index.js
index a73b4dc..73f489d 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -43,8 +43,9 @@
'Hebrew': { name: 'Linux Libertine O' },
'Latin': { name: 'Linux Libertine O' }
};
-['Bengali','Devanagari','Kannada','Malayalam','Tamil','Telugu'].forEach(function(l)
{
- SCRIPT_FONTS[l] = { name: 'Lohit-'+l, opts: LOHITFONT, nolatin: true };
+['Assamese',
'Bengali','Devanagari','Gujarati','Kannada','Malayalam','Oriya','Gurmukhi','Tamil','Telugu'].forEach(function(l)
{
+ var f = (l === 'Gurmukhi') ? 'Punjabi' : l;
+ SCRIPT_FONTS[l] = { name: 'Lohit-'+f, opts: LOHITFONT, nolatin: true };
});
// fonts for specific languages
@@ -1545,7 +1546,10 @@
// image file path
head += '\n\\graphicspath{{' + path.join(builddir, 'bundle', 'images')
+ '/}}';
// start the doc!
- head += '\n\\begin{document}\\maketitle';
+ head += '\n\\begin{document}';
+ var xxxx = Polyglossia.lookup(collectionLanguage);
+ head += '\\' + xxxx.script.toLowerCase() + 'font'; // WILL GO AWAY
+ head += '\\maketitle';
if (toc) {
head += '\n\\pagenumbering{roman}\\tableofcontents\\newpage';
head += '\n\\pagenumbering{arabic}';
diff --git a/lib/polyglossia.js b/lib/polyglossia.js
index 8b8a241..c93a951 100644
--- a/lib/polyglossia.js
+++ b/lib/polyglossia.js
@@ -12,6 +12,7 @@
divehi: { dir: 'rtl', script: 'Thaana' },
farsi: { dir: 'rtl', script: 'Arabic' },
greek: { script: 'Greek' },
+ gujarati: { script: 'Gujarati' },
hebrew: { dir: 'rtl', script: 'Hebrew' },
hindi: { script: 'Devanagari' },
japanese: { script: 'Kana' },
@@ -19,8 +20,10 @@
korean: { script: 'Hangul' },
lao: { script: 'Lao' },
malayalam: { script: 'Malayalam' },
- marathi: { script: 'Devaganari' },
+ marathi: { script: 'Devanagari' },
nko: { dir: 'rtl', script: "N'ko" },
+ oriya: { script: 'Oriya' },
+ punjabi: { script: 'Gurmukhi' },
russian: { script: 'Cyrillic' },
sanskrit: { script: 'Devanagari' },
serbian: { script: 'Cyrillic' },
@@ -65,6 +68,7 @@
el: { lang: 'greek' },
'el-latn': { lang: 'greek', options: 'numerals=arabic' },
grc: { lang: 'greek', options: 'variant=ancient' },
+ gu: { lang: 'gujarati' },
he: { lang: 'hebrew' },
hi: { lang: 'hindi' },
is: { lang: 'icelandic' },
@@ -85,6 +89,8 @@
no: { lang: 'norsk' },
nn: { lang: 'nynorsk' },
oc: { lang: 'occitan' },
+ or: { lang: 'oriya' },
+ pa: { lang: 'punjabi' },
pmsq: { lang: 'piedmontese' },
pl: { lang: 'polish' },
pt: { lang: 'portuges' },
diff --git a/tex/gloss-chinese.ldf b/tex/gloss-chinese.ldf
index e6d6ef2..ad6fd5a 100644
--- a/tex/gloss-chinese.ldf
+++ b/tex/gloss-chinese.ldf
@@ -2,10 +2,11 @@
\RequirePackage{xeCJK}
\PolyglossiaSetup{chinese}{%
- script=Chinese,
- scripttag=CJK,
- langtag=Chinese Simplified, % xxx or 'Chinese Traditional' or
- % 'Chinese Hong Kong' or 'Chinese Phonetic'
+ % look in
/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty for these,
\newfontscript
+ script=CJK,
+ %scripttag=hani, XXX
+ % XXX this is the \newfontlanguage command from fontspec-xetex.sty
+ langtag=ZHS,
hyphennames={nohyphenation},
fontsetup=true
}
--
To view, visit https://gerrit.wikimedia.org/r/159192
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2decf7ad5586f16c7429048a9c46463503f33b5e
Gerrit-PatchSet: 1
Gerrit-Project:
mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits