User Tools

Site Tools




Trying out sile , a typesetting engine (like i.e. TeX). It can easily utilize the Adobe/google panCJK fonts, something I did not yet manage to do with TeX/XeTeX.

setup on Fedora21

yum install harfbuzz-devel make automake gcc freetype-devel \
  fontconfig-devel lua-devel lua-lpeg lua-expat \
  libpng-devel wget sil-gentium-fonts

cd Downloads/
tar xzfv sile-0.9.1.tar.gz 
cd sile-0.9.1/
./configure --prefix=/home/chris/bin/soft_sile-0.9.1
make -j4
make install
export PATH=/home/chris/bin/soft_sile-0.9.1/bin:$PATH

simple Japanese example

$ sudo yum install adobe-source-code-pro-fonts
$ cat japanese_test.sil


\font[family=IPAMincho,language=ja]{日本語の植字 abcdef}
\font[family=Noto Sans Japanese Regular,language=ja]{日本語の植字 abcdef}
\font[family=Source Code Pro,language=ja]{日本語の植字 abcdef}

$ sile japanese_test.sil 
This is SILE 0.9.1
<japanese_test.sil>No patterns for language ja
$ evince japanese_test.pdf

look at all available fonts

mkdir /tmp/allfonts
cd /tmp/allfonts

# look at installed fonts
fc-list |sed -e 's,:style.*,,' -e 's,.*:,,' -e 's/.*,//' | \
  while read line; do echo "$line"; done >allfonts
# for which fonts can we render the example text?
rm goodfonts
cat allfonts | while read line; do
  echo '\begin[papersize=a4]{document}' >simple5.sil; 
  echo -en '\\' >>simple5.sil;
  echo "font[family=$line,language=ja]{日本 語の植字 Русский Текст abcdef} " >>simple5.sil;
  echo "font: $line" >>simple5.sil;
  echo -n '\end{document}\n' >>simple5.sil;
  sile simple5.sil && echo "$line" >>goodfonts;

# now render a pdf with all good fonts
echo '\begin[papersize=a4]{document}' >simple5.sil; 
cat goodfonts | while read line; do
  echo "font: $line" >>simple5.sil; 
  echo -en '\\font[family=' >>simple5.sil;
  echo "$line,language=ja]{日本語の植字 РусскийТекст abcdef} \skip" >>simple5.sil; 
  echo $line; 
echo -n '\end{document}\n' >>simple5.sil
sile simple5.sil

evince simple5.sil
software/sile.txt · Last modified: 2019/12/08 12:21 by chris