freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Modifying/Enhancing the Truetype Interpreter


From: Werner LEMBERG
Subject: Re: [ft] Modifying/Enhancing the Truetype Interpreter
Date: Thu, 11 Mar 2010 07:41:25 +0100 (CET)

> http://www.infinality.net/files/ttinterp.20100310-1.patch

Thanks.  Will have a look later.

> Screenshot of the patch in action, with various fonts, in WINE
> Wordpad.  There are artifacts with some fonts / glyphs that will
> probably have to have TT function calls disabled in order to render
> better:
> http://www.infinality.net/files/wine-wordpad-2010-03-10.png

This is not very useful IMHO.  It's too much information.  What I
would really like to see is a before-after comparison of single fonts,
at various pixel sizes.  Then it's easy to do blink comparisons.
Perhaps you can write a small script which generates such images
automatically, perhaps even generating a `diff' image which marks the
changed pixels with, say, red.

I've used the script below for B/W images; maybe it can be extended
accordingly.


    Werner


======================================================================


# Compare two B/W PNG image files, producing a `diff' image file which
# highlights changed pixels.  Identical pixels are in grey, pixels only in
# $1 are coloured green, and pixels only in $2 are coloured red.

before=`basename $1 .png`
after=`basename $2 .png`

if test $# -eq 3; then
  result=$3
else
  result=$before-$after.png
fi

# We need `pnmdepth' to normalize the colour values so that arguments to
# `ppmchange' are matched after calling `pamcomp'.

cat $1 \
| pngtopnm \
| pnmdepth 255 \
| ppmchange black green \
> $before-green.pnm
cat $2 \
| pngtopnm \
| pnmdepth 255 \
| ppmchange black red \
> $after-red.pnm

pamcomp -opacity=0.5 \
        $before-green.pnm \
        $after-red.pnm \
| ppmchange rgb:b3/b3/00 gray95 \
| ppmchange rgb:b3/ff/b3 green \
| ppmchange rgb:ff/b3/b3 red \
| pnmtopng \
> $result 2> /dev/null

rm $before-green.pnm
rm $after-red.pnm

# eof




reply via email to

[Prev in Thread] Current Thread [Next in Thread]