diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2008-12-25 01:24:46 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2008-12-25 01:24:46 -0500 |
commit | af91fc1974ce2dfbaab187e22769cdfb9e6279d9 (patch) | |
tree | b0e9b2a9cc42d837003284d10d0bc450e34eb686 /src/cairo-font-face-twin.c | |
parent | 439959d1af1f6c4ce174a3fee524eacfc18a00bd (diff) |
[twin] Optimize hinting
Diffstat (limited to 'src/cairo-font-face-twin.c')
-rw-r--r-- | src/cairo-font-face-twin.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/cairo-font-face-twin.c b/src/cairo-font-face-twin.c index ce1a55b5..796561f4 100644 --- a/src/cairo-font-face-twin.c +++ b/src/cairo-font-face-twin.c @@ -281,13 +281,8 @@ _twin_snap (double v, double *snap, double *snapped, int n) double dist = after - before; double snap_before = snapped[s]; double snap_after = snapped[s+1]; - double move_before = snap_before - before; - double move_after = snap_after - after; double dist_before = v - before; - double dist_after = after - v; - double move = (dist_before * move_after + dist_after * move_before) / dist; - /* XXX optimize the above */ - v += move; + v = snap_before + (snap_after - snap_before) * dist_before / dist; break; } } |