Vous n'êtes pas connecté.
Pages: 1
Busybox shell script:
#!/bin/sh
SCRIPT=${0##*/}
DIR='/usr/share/fonts'
OUTFILE=$HOME/fontview.html
cat <<EOT -- >$OUTFILE
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" value="text/html" />
<charset="UTF-8" />
<style type="text/css">
div {
border-bottom: 1px dotted silver;
}
div > span:nth-child(1) {
display: inline-block;
width: 15em;
}
</style>
</head>
<body>
<div></div>
EOT
OIFS=$IFS
IFS=$'\n'
fc-list | cut -d: -f1 | sort | uniq | while read font; do
echo -e "\t\t<div><span>$font</span><span style=\"font-family: $font\">$font</span></div>\n" >>$OUTFILE
done
IFS=$OIFS
cat <<EOT -- >>$OUTFILE
</body>
</html>
EOT
browser file://$OUTFILE
echo "Output file is: $OUTFILE"
Hors ligne
Brilliant solution! Thank you
Hors ligne
Make text file, save it with name inf_fonts.desktop to folder ~/.local/share/applications (note this folder is hidden):
[c][Desktop Entry]
Version=1.0
Type=Application
Name=Font testing page
Comment=Infinality Project's Font testing page
Exec=tazweb http://www.infinality.net/files/font.html
TryExec=tazweb
Icon=fonts
Categories=Utility;[/c]
Now click: Menu → Utility → Font testing page
You can choose between your installed fonts & various sizes & different unicode pages.
Note: Font list is generated by little (1 KB) SWF applet, if you haven't Flash plugin, you need to input font family names manually (tested with SliTaz Rolling).
Hors ligne
Great idea!
Thx for sharing.
:-)
Hors ligne
Pages: 1
[ Généré en 0.016 secondes, 7 requêtes exécutées - Utilisation de la mémoire: 1.53 MiO (Pic : 1.77 MiO) ]