Re: fonts in release-notes
I believe this should be done using xsl file than Makefile, though...
using ifneq "$(DBLATEXFONTS_$(LINGUA))" "" clause,
special font config can be used for each per-lang while all others use generic one,
by only adding, like DBLATEXFONTS_ja vars
fonts selection used for ja are basically same as D-Edu-doc's
Index: trunk/release-notes/Makefile
===================================================================
--- trunk/release-notes/Makefile (revision 11314)
+++ trunk/release-notes/Makefile (working copy)
@@ -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 pl
+DISABLED_PDF=pl
# 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))
@@ -80,6 +80,21 @@
--param=glossterm.auto.link=1 \
--param=lingua=$(LINGUA) \
--param=monoseq.hyphenation=nohyphen
+DBLATEXFONTS=--param=xetex.font='\setmainfont{CharisSIL-R.ttf}[ \
+ BoldFont = CharisSIL-B.ttf , \
+ ItalicFont = CharisSIL-I.ttf , \
+ BoldItalicFont = CharisSIL-BI.ttf] \
+\setsansfont{FreeSans} \
+\setmonofont{FreeMono}'
+# per-lang specific selection the generic ones do not cover
+DBLATEXFONTS_ja=--param=xetex.font='\usepackage{xeCJK} \
+ \setCJKmainfont{IPAPGothic} \
+ \setCJKsansfont{IPAPGothic} \
+ \setCJKmonofont{IPAexGothic} \
+ \setmainfont{Latin Modern Sans} \
+ \setsansfont{IPAPGothic} \
+ \setmonofont{IPAexGothic}'
+
PROFILE=$(DOCBOOK_XSL)/profiling/profile.xsl
PREPROC=$(CURDIR)/preproc.xsl
DBLATEXXSL=$(CURDIR)/dblatex.xsl
@@ -203,12 +218,19 @@
$(XMLROFF) -o $@ $<; \
fi
else
+ifneq "$(DBLATEXFONTS_$(LINGUA))" ""
%.pdf: %.xml
@test -n "`which dblatex`" || { echo "ERROR: dblatex not found. Please install the dblatex package." ; false ; }
export TEXINPUTS="$$(pwd)/$(@D):"; \
- $(XP) $(DBLATEXXSL) $< | $(DBLATEX) --output=$@ -
+ $(XP) $(DBLATEXXSL) $< | $(DBLATEX) $(DBLATEXFONTS_$(LINGUA)) --output=$@ -
+else
+%.pdf: %.xml
+ @test -n "`which dblatex`" || { echo "ERROR: dblatex not found. Please install the dblatex package." ; false ; }
+ export TEXINPUTS="$$(pwd)/$(@D):"; \
+ $(XP) $(DBLATEXXSL) $< | $(DBLATEX) $(DBLATEXFONTS) --output=$@ -
endif
endif
+endif
ifneq "$(filter $(XMLROFF_LANGS),$(LINGUA))" ""
# Can't we just drop PS in favour of PDF?
--
victory
no need to CC me :-)
Reply to: