[prev in list] [next in list] [prev in thread] [next in thread]
List: freetype-devel
Subject: Fix for FT2-oldapi\ttapi.c
From: Jack Davis <jack () metagraphics ! com>
Date: 1999-06-14 16:56:09
[Download RAW message or body]
Hi David/Werner,
I believe there's an error in the TT_Get_Glyph_Big_Metrics() function within FT2's \
oldapi\ttapi.c interface. In testing some earlier FT1.2 programs with FT2, I \
discovered that metrics->bbox.yMin and metrics->bbox.yMax were incorrectly swapped.
FT2 oldapi\ttapi.c lines 1170 & 1171 currently reads:
metrics->bbox.yMin = met->horiBearingY;
metrics->bbox.yMax = met->horiBearingY - met->height;
For example in a typical instance where met->horiBearingY=960 and met->height=320,
the return values are swapped and bbox.yMin returns greater-than bbox.yMax.
To correct this problem, change oldapi\ttapi.c lines 1170 & 1171 from:
metrics->bbox.yMin = met->horiBearingY;
metrics->bbox.yMax = met->horiBearingY - met->height;
change to:
metrics->bbox.yMin = met->horiBearingY - met->height;
metrics->bbox.yMax = met->horiBearingY;
With this one change my FT1.2 programs now work! Other than this minor glitch, \
everything else in the ttapi.c compatibility interface seems to work - very nice!
-jack
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic