-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Nikolai, Sorry for the late reply to your mail, but I had to catch up on other things first after my holidays. On Tuesday 27 July 2004 10:25, Nikolai Prokoschenko wrote: > I'm trying to build PDF versions of the russian d-i manual and I don't > seem to get the FOP font configuration right. Has anyone got a working one > for a similar language (Greek?) ? Are there any tools to auto-create the > configuration from the fonts existing in system? What Russian manual? There is no Russian translation in SVN... However, I managed to solve a similar problem for Japanese using the Kochi-Mincho TrueType font. For Czech and Greek we currently use the Arial TrueType font. Here is how I did it. All necessary files are attached. - - install a Cyrillic TrueType font on your system - - create directory build/fop/ - - copy attached modified files style.fo.xsl and buildfop.sh to build/ - - copy attached file config.xml to build/fop/ - - in shell, go to build/fop/ and run attached script 'fop_make-ttfcm <fontname>' for the Cyrillic fonts - - replace "Arial" by the Cyrillic fontnames in style-fo.xsl - - build the html files as normal - - create the pdf using './buildfop.sh pdf <language>' (I obtained the Arial fonts from msttcorefonts package. It could be Arial contains enough Cyrillic characters for your purpose. In that case the procedure would be slightly simpler.) Good luck, FJP -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBH8Cfgm/Kwh6ICoQRAjoXAKCU8HLAyJen5pgo8THsjzRx6V4byQCeNYeV 5TYVtyoy6mNJKIQi5y8/4GU= =xxI4 -----END PGP SIGNATURE-----
Attachment:
buildfop.sh
Description: application/shellscript
<!--<!DOCTYPE configuration SYSTEM "config.dtd">--> <!-- this file contains templates which allow an user easy configuration of Fop. Actually normally you don't need this configuration file, but if you need to change configuration, you should always use this file and *not* config.xml. Usage: java org.apache.fop.apps.Fop -c userconfig.xml -fo fo-file -pdf pdf-file --> <configuration> <!-- NOT IMPLEMENTED basedir: normally the base directory is the directory where the fo file is located. if you want to specify your own, uncomment this entry --> <!-- <entry> <key>baseDir</key> <value></value> </entry> --> <!-- ************************************************************************ HYPHENATION ************************************************************************ --> <!-- hyphenation directory if you want to specify your own directory with hyphenation pattern then uncomment the next entry and add the directory name --> <!-- FJP: Tested for Dutch, but does not work (yet). <entry> <key>hyphenation-dir</key> <value>fop-hyph</value> </entry> --> <!-- ************************************************************************ Add fonts here ************************************************************************ --> <fonts> <font metrics-file="fop/Arial.xml" kerning="yes" embed-file="fop/Arial.ttf"> <font-triplet name="Arial" style="normal" weight="normal"/> </font> <font metrics-file="fop/Arial_Bold.xml" kerning="yes" embed-file="fop/Arial_Bold.ttf"> <font-triplet name="Arial" style="normal" weight="bold"/> </font> <font metrics-file="fop/Arial_Italic.xml" kerning="yes" embed-file="fop/Arial_Italic.ttf"> <font-triplet name="Arial" style="italic" weight="normal"/> </font> <font metrics-file="fop/Arial_Bold_Italic.xml" kerning="yes" embed-file="fop/Arial_Bold_Italic.ttf"> <font-triplet name="Arial" style="italic" weight="bold"/> </font> <font metrics-file="fop/FreeMono.xml" kerning="yes" embed-file="fop/FreeMono.ttf"> <font-triplet name="FreeMono" style="normal" weight="normal"/> </font> <font metrics-file="fop/FreeMonoBold.xml" kerning="yes" embed-file="fop/FreeMonoBold.ttf"> <font-triplet name="FreeMono" style="normal" weight="bold"/> </font> <font metrics-file="fop/FreeMonoOblique.xml" kerning="yes" embed-file="fop/FreeMonoOblique.ttf"> <font-triplet name="FreeMono" style="italic" weight="normal"/> </font> <font metrics-file="fop/FreeMonoBoldOblique.xml" kerning="yes" embed-file="fop/FreeMonoBoldOlique.ttf"> <font-triplet name="FreeMono" style="italic" weight="bold"/> </font> <font metrics-file="fop/FreeSans.xml" kerning="yes" embed-file="fop/FreeSans.ttf"> <font-triplet name="FreeSans" style="normal" weight="normal"/> </font> <font metrics-file="fop/FreeSansBold.xml" kerning="yes" embed-file="fop/FreeSansBold.ttf"> <font-triplet name="FreeSans" style="normal" weight="bold"/> </font> <font metrics-file="fop/FreeSansOblique.xml" kerning="yes" embed-file="fop/FreeSansOblique.ttf"> <font-triplet name="FreeSans" style="italic" weight="normal"/> </font> <font metrics-file="fop/FreeSansBoldOblique.xml" kerning="yes" embed-file="fop/FreeSansBoldOlique.ttf"> <font-triplet name="FreeSans" style="italic" weight="bold"/> </font> <font metrics-file="fop/FreeSerif.xml" kerning="yes" embed-file="fop/FreeSerif.ttf"> <font-triplet name="FreeSerif" style="normal" weight="normal"/> </font> <font metrics-file="fop/FreeSerifBold.xml" kerning="yes" embed-file="fop/FreeSerifBold.ttf"> <font-triplet name="FreeSerif" style="normal" weight="bold"/> </font> <font metrics-file="fop/FreeSerifItalic.xml" kerning="yes" embed-file="fop/FreeSerifItalic.ttf"> <font-triplet name="FreeSerif" style="italic" weight="normal"/> </font> <font metrics-file="fop/FreeSerifBoldItalic.xml" kerning="yes" embed-file="fop/FreeSerifBoldItalic.ttf"> <font-triplet name="FreeSerif" style="italic" weight="bold"/> </font> <font metrics-file="fop/kochi-mincho-subst.xml" kerning="yes" embed-file="fop/kochi-mincho-subst.ttf"> <font-triplet name="KochiMincho" style="normal" weight="normal"/> </font> <font metrics-file="fop/kochi-mincho-subst.xml" kerning="yes" embed-file="fop/kochi-mincho-subst.ttf"> <font-triplet name="KochiMincho" style="normal" weight="bold"/> </font> <font metrics-file="fop/kochi-mincho-subst.xml" kerning="yes" embed-file="fop/kochi-mincho-subst.ttf"> <font-triplet name="KochiMincho" style="italic" weight="normal"/> </font> <font metrics-file="fop/kochi-mincho-subst.xml" kerning="yes" embed-file="fop/kochi-mincho-subst.ttf"> <font-triplet name="KochiMincho" style="italic" weight="bold"/> </font> </fonts> </configuration>
Attachment:
fop_make-ttfcm
Description: application/shellscript