Blame tests/hb_pango.bash
|
Packit |
7179fe |
#!/bin/bash
|
|
Packit |
7179fe |
# Copyright (C) 2012, Aravinda VK <hallimanearavind@gmail.com>
|
|
Packit |
7179fe |
# http://aravindavk.in
|
|
Packit |
7179fe |
|
|
Packit |
7179fe |
# This program is free software: you can redistribute it and/or modify
|
|
Packit |
7179fe |
# it under the terms of the GNU General Public License as published by
|
|
Packit |
7179fe |
# the Free Software Foundation, either version 3 of the License, or
|
|
Packit |
7179fe |
# (at your option) any later version.
|
|
Packit |
7179fe |
|
|
Packit |
7179fe |
# This program is distributed in the hope that it will be useful,
|
|
Packit |
7179fe |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
7179fe |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
7179fe |
# GNU General Public License for more details.
|
|
Packit |
7179fe |
|
|
Packit |
7179fe |
# You should have received a copy of the GNU General Public License
|
|
Packit |
7179fe |
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
7179fe |
|
|
Packit |
7179fe |
rm -fr hb_pango
|
|
Packit |
7179fe |
mkdir -p hb_pango
|
|
Packit |
7179fe |
mkdir -p hb_pango/pango
|
|
Packit |
7179fe |
mkdir -p hb_pango/hb
|
|
Packit |
7179fe |
|
|
Packit |
7179fe |
touch hb_pango/index.html
|
|
Packit |
7179fe |
echo '' >> hb_pango/index.html
|
|
Packit |
7179fe |
echo "<html><head><title>Harfbuzz and Pango rendering test</title>" >> hb_pango/index.html
|
|
Packit |
7179fe |
echo "<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'></head><body>" >> hb_pango/index.html
|
|
Packit |
7179fe |
|
|
Packit |
7179fe |
number=1
|
|
Packit |
7179fe |
# read characters in inputfile
|
|
Packit |
7179fe |
while read ALINE
|
|
Packit |
7179fe |
do
|
|
Packit |
7179fe |
hb-view ~/.fonts/Gubbi.ttf "$ALINE" --font-size=30 --output-file=hb_pango/hb/$number.png
|
|
Packit |
7179fe |
pango-view -q --font="Gubbi 20" --text="$ALINE" --output=hb_pango/pango/$number.png
|
|
Packit |
7179fe |
|
|
Packit |
7179fe |
echo "TEXT : $ALINE " >> hb_pango/index.html
|
|
Packit |
7179fe |
echo "HB :
" >> hb_pango/index.html
|
|
Packit |
7179fe |
echo "PANGO:
" >> hb_pango/index.html
|
|
Packit |
7179fe |
|
|
Packit |
7179fe |
number=$((number + 1))
|
|
Packit |
7179fe |
done < test_cases.txt
|
|
Packit |
7179fe |
|
|
Packit |
7179fe |
echo "</body></html>" >> hb_pango/index.html
|