#!/bin/sh

# $Id: mirrored,v 1.3 1998/11/08 10:09:39 czyborra Exp czyborra $

# A number of parentheses and mathematical symbols in Unicode are
# defined to have the property "mirrored".  They appear mirrored in
# right-to-left context (Hebrew and Arabic text).  This script
# generates the mirrored variants for the GNU unifont.

perl -ne '$mirrored{$1}=1 if /^(....);.*;Y;/;
print if /^(....):/ && $mirrored{$1};
' ${UNIDATA-unidata2.txt} ${UNIFONT-unifont.hex} |
hexdraw | perl -pe 's/[-#]+/reverse($&)/e' | hexdraw

# Once you pipe this script's output to | hex2bdf | xviewer xmbdfed,
# you will see that the generated mirrored glyphs can still use some
# manual adjustments: some larger left margins have moved right and
# the "3" and "4" on the U+221A CUBE ROOT and U+221B FOURTH ROOT
# probably want to be mirrored back around their own axis.
