[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#821119: Fw: Change build mechanism for sk [ Re: Debian refcard: call to update translations ]



On Wed, 20 Apr 2016 22:02:06 +0200
Holger Wansing wrote:

> So, "make USE_DBLATEX=1" does the trick.

that was what I missed
then I tried to make "make USE_DBLATEX=2" work,
and could do it for most of langs with a patch to specify fonts to use
(only hebrew, which stops entire build process, cannot be build that way)

of course fonts can be other ones,
 but these seems to be built fine,
 and I don't know which ones are preferred by the native people
 so that will be up to them :)

to make the patch work, some of following packages will be needed:
fonts-hanazono
fonts-lohit-deva
fonts-deva
fonts-mlym
fonts-cwtex-fs

-- 
victory
no need to CC me :-)
--
Index: Makefile
===================================================================
--- Makefile	(revision 4)
+++ Makefile	(working copy)
@@ -48,7 +48,7 @@
 DBLATEX=dblatex --backend=xetex --texstyle=refcard.sty --xsl-user=dblatex.xsl
 ifdef USE_DBLATEX
     ifeq ($(USE_DBLATEX),2)
-	XMLROFF_LANGS=
+	XMLROFF_LANGS=he
     else
 	XMLROFF_LANGS=ar cs el he hi ja ml sk zh_CN zh_TW
     endif
Index: dblatex.xsl
===================================================================
--- dblatex.xsl	(revision 4)
+++ dblatex.xsl	(working copy)
@@ -3,6 +3,48 @@
 
   <xsl:param name="latex.encoding">utf8</xsl:param>
   <xsl:param name="latex.class.options">10pt,onecolumn</xsl:param>
+  <xsl:param name="xetex.font">
+   <xsl:choose>
+    <xsl:when test="contains('ja', /article/@lang)">
+	<xsl:text>\usepackage{xeCJK}&#10;</xsl:text>
+	<xsl:text>\setCJKmainfont{IPAPGothic}&#10;</xsl:text>
+	<xsl:text>\setCJKsansfont{IPAPMincho}&#10;</xsl:text>
+	<xsl:text>\setCJKmonofont{IPAexGothic}&#10;</xsl:text>
+	<xsl:text>\setmainfont{Kochi Gothic}&#10;</xsl:text>
+	<xsl:text>\setsansfont{IPAPMincho}&#10;</xsl:text>
+	<xsl:text>\setmonofont{IPAexGothic}&#10;</xsl:text>
+    </xsl:when>
+    <xsl:when test="contains('zh', /article/@lang)">
+	<xsl:text>\usepackage{xeCJK}&#10;</xsl:text>
+	<xsl:text>\setCJKmainfont{cwTex}&#10;</xsl:text>
+	<xsl:text>\setCJKsansfont{HanaMinA}&#10;</xsl:text>
+	<xsl:text>\setCJKmonofont{HanaMinA}&#10;</xsl:text>
+	<xsl:text>\setmainfont{HanaMinA}&#10;</xsl:text>
+	<xsl:text>\setsansfont{HanaMinA}&#10;</xsl:text>
+	<xsl:text>\setmonofont{HanaMinA}&#10;</xsl:text>
+    </xsl:when>
+    <xsl:when test="contains('hi', /article/@lang)">
+	<xsl:text>\setmainfont{Samanata}&#10;</xsl:text>
+	<xsl:text>\setsansfont{Samanata}&#10;</xsl:text>
+	<xsl:text>\setmonofont{Samanata}&#10;</xsl:text>
+    </xsl:when>
+    <xsl:when test="contains('ml', /article/@lang)">
+	<xsl:text>\setmainfont{AnjaliOldLipi}&#10;</xsl:text>
+	<xsl:text>\setsansfont{Suruma}&#10;</xsl:text>
+	<xsl:text>\setmonofont{AnjaliOldLipi}&#10;</xsl:text>
+    </xsl:when>
+    <xsl:when test="contains('ar', /article/@lang)">
+	<xsl:text>\setmainfont{Amiri}&#10;</xsl:text>
+	<xsl:text>\setsansfont{Amiri}&#10;</xsl:text>
+	<xsl:text>\setmonofont{Amiri}&#10;</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+	<xsl:text>\setmainfont{DejaVu Serif}&#10;</xsl:text>
+	<xsl:text>\setsansfont{DejaVu Sans}&#10;</xsl:text>
+	<xsl:text>\setmonofont{DejaVu Sans Mono}&#10;</xsl:text>
+    </xsl:otherwise>
+   </xsl:choose>
+  </xsl:param>
 
   <xsl:param name="format">a4</xsl:param>
 
Index: po4a/ml.po
===================================================================
--- po4a/ml.po	(revision 4)
+++ po4a/ml.po	(working copy)
@@ -18,7 +18,7 @@
 #. type: Attribute 'lang' of: <article>
 #: entries.dbk:4
 msgid "en-GB"
-msgstr "en-GB"
+msgstr "ml"
 
 #. type: Content of: <article><title>
 #: entries.dbk:7


Reply to: