Thread: PRS-T1 getting adb working
View Single Post
Old 03-01-2012, 05:19 PM   #56
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Quote:
Originally Posted by xuyn2003 View Post
Now I can replace any fonts of /ebook, including the system UI fonts.

Code:
#!/system/bin/sh

mkdir /data/altsd

mount -o noatime,utf8 -t vfat /dev/block/mmcblk2p4 /data/altsd

afd=/data/altsd/altfonts/
fts=`ls $afd`
for ft in $fts
 do
  mount -o bind $afd$ft /ebook/fonts/$ft
done
One query - do you need to deal with the possibility of font files with spaces in the names? You might need to do something like:

Code:
afd=/data/altsd/altfonts/
fts=$(cd $afd; echo "*")
for ft in $fts; do
  mount -o bind $afd"$ft" /ebook/fonts/"$ft"
done
or

Code:
afd=/data/altsd/altfonts/
ls -1 $afd | while read ft; do
  mount -o bind $afd"$ft" /ebook/fonts/"$ft"
done
where the " marks are important.

Cheers,
Simon.
snarkophilus is offline   Reply With Quote