Re: Fw: Debian release-notes: enable PDF build for Japanese ?
Hi,
victory <victory.deb@gmail.com> wrote:
> On Thu, 15 Jun 2017 22:05:17 +0200
> Holger Wansing wrote:
> > When building the PDF, I get the following notes:
> > Character U+30B1 (ケ) not in font '[lmmono10-italic]'
> > Character U+30B8 (ジ) not in font '[lmmono10-italic]'
> > Character U+30C3 (ッ) not in font '[lmmono10-italic]'
> > Character U+30D1 (パ) not in font '[lmmono10-italic]'
> > Character U+30FC (ー) not in font '[lmmono10-italic]'
> > What are these characters? Can you see places, where they are missing?
> > And even if they are missing somewhere, maybe we can enable the PDF build
> > nevertheless, because it's better with the missing characters then having
> > no PDF at all?
>
> those are so-called Katakana and
> what this log shows is vlgothic is not used for them;
>
> set****font vars are also needed in addition to setCJK****font
> as xsl:otherwise clause is not applied there
Yes, you are right! I have added the lines from xsl:otherwise clause
to the ja clause, a new patch is attached.
That way the ja PDF builds without any error or notes. Many thanks!
I will send a new PDF to translator henrich for proofreading.
Holger
--
============================================================
Created with Sylpheed 3.5.0 under
D E B I A N L I N U X 8 . 0 " J E S S I E " .
Registered Linux User #311290 - https://linuxcounter.net/
============================================================
Index: Makefile
===================================================================
--- Makefile (Revision 11645)
+++ Makefile (Arbeitskopie)
@@ -44,14 +44,14 @@
# (either original English or translators don't like .po)
DBK_LANGUAGES := en ca cs
PO_LANGUAGES := $(filter-out $(DBK_LANGUAGES), $(ALL_LANGUAGES))
-XMLROFF_LANGS=be ja ml vi zh-cn zh-tw
+XMLROFF_LANGS=be ml vi zh-cn zh-tw
PO_FILES := $(wildcard */*.po)
DBK_FILES := $(wildcard $(patsubst %,%/*.dbk,$(DBK_LANGUAGES)))
# DISABLED_PDF are the languages we will not generate PDF versions for:
-DISABLED_PDF=ja vi zh-cn zh-tw
+DISABLED_PDF=vi zh-cn zh-tw
# cairo backend of xmlroff 0.6.0 crashes on some languages (#492597)
-GPLIST=ja ml vi
+GPLIST=ml vi
LANGUAGES-publish := $(addsuffix -publish,$(LANGUAGES))
LANGUAGES-clean := $(addsuffix -clean,$(LANGUAGES))
@@ -75,13 +75,7 @@
DBLATEX=dblatex --backend=xetex --style=db2latex \
--xslt-opts=--nonet --no-external \
--xsl-user=hyphenation.xsl \
- --param=xetex.font=' \
-\setmainfont{CharisSIL-R.ttf}[ \
- BoldFont = CharisSIL-B.ttf , \
- ItalicFont = CharisSIL-I.ttf , \
- BoldItalicFont = CharisSIL-BI.ttf] \
-\setsansfont{FreeSans} \
-\setmonofont{FreeMono}' \
+ --xsl-user=$(CURDIR)/xetex_param.xsl \
--param=draft.mode=$(draftmode) \
--param=format=a4 \
--param=glossterm.auto.link=1 \
Index: debian/control
===================================================================
--- debian/control (Revision 11639)
+++ debian/control (Arbeitskopie)
@@ -4,7 +4,7 @@
Maintainer: Debian Documentation Project <debian-doc@lists.debian.org>
Uploaders:
Standards-Version: 3.8.2
-Build-Depends-Indep: docbook-xsl, dblatex, xsltproc, po4a, w3m, libxml2-utils, xmlroff, texlive-lang-cyrillic, subversion
+Build-Depends-Indep: docbook-xsl, dblatex, xsltproc, po4a, w3m, libxml2-utils, xmlroff, texlive-lang-cyrillic, subversion, fonts-vlgothic
# WARNING: network needed (svn)
# ttf-arphic-ukai, ttf-arphic-uming, ttf-arphic-bkai00mp, ttf-arphic-bsmi00lp, ttf-arphic-gbsn00lp, ttf-arphic-gkai00mp
# texlive- (used by dblatex)
Index: ja/hyphenation.tex
===================================================================
--- ja/hyphenation.tex (Revision 0)
+++ ja/hyphenation.tex (Arbeitskopie)
@@ -0,0 +1 @@
+\hyphenation{}
Index: xetex_param.xsl
===================================================================
--- xetex_param.xsl (Revision 0)
+++ xetex_param.xsl (Arbeitskopie)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
+<!-- vim: set sts=2 ai expandtab: -->
+
+<!--############################################################################
+ XSLT Stylesheet DocBook -> LaTeX (XeTeX focused)
+ ############################################################################ -->
+
+ <xsl:param name="xetex.font">
+ <xsl:choose>
+ <xsl:when test="$lingua = 'ja'">
+ <!-- Depends: fonts-vlgothic -->
+ <xsl:text>\usepackage{xeCJK} </xsl:text>
+ <xsl:text>\setCJKmainfont{VL PGothic} </xsl:text>
+ <xsl:text>\setCJKsansfont{VL PGothic} </xsl:text>
+ <xsl:text>\setCJKmonofont{VL Gothic} </xsl:text>
+ <xsl:text>\setmainfont{CharisSIL-R.ttf}[BoldFont = CharisSIL-B.ttf , ItalicFont = CharisSIL-I.ttf , BoldItalicFont = CharisSIL-BI.ttf] </xsl:text>
+ <xsl:text>\setsansfont{FreeSans} </xsl:text>
+ <xsl:text>\setmonofont{FreeMono} </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>\setmainfont{CharisSIL-R.ttf}[BoldFont = CharisSIL-B.ttf , ItalicFont = CharisSIL-I.ttf , BoldItalicFont = CharisSIL-BI.ttf] </xsl:text>
+ <xsl:text>\setsansfont{FreeSans} </xsl:text>
+ <xsl:text>\setmonofont{FreeMono} </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+</xsl:stylesheet>
Reply to: