LazFreeType glyph bounds incorrect
Original Reporter info from Mantis: circular
-
Reporter name:
Original Reporter info from Mantis: circular
- Reporter name:
Description:
The bounds of the glyph are not computed correctly. It is due to 2 additional debug points added that need to be ignored when computing the bounds.
To fix, I suggest to add a parameter to the TT_Get_Outline_BBox function indicating the number of "phantom" points.
Steps to reproduce:
Run attached sample project and look at white area.
Additional information:
(*****************************************************************)
(* Compute an outline's bounding box *)
(* *)
function TT_Get_Outline_BBox( var out : TT_Outline;
var bbox : TT_Bbox;
nbPhantomPoints : integer ) : TT_Error;
var
x, y : TT_Pos;
n : Int;
begin
with bbox do
begin
xMin := $7FFFFFFF;
xMax := -$80000000;
yMin := $7FFFFFFF;
yMax := -$80000000;
for n := 0 to out.n_points-1-nbPhantomPoints do
begin
x := out.points^[n].x;
if x < xMin then xMin := x;
if x > xMax then xMax := x;
y := out.points^[n].y;
if y < yMin then yMin := y;
if y > yMax then yMax := y;
end;
end;
TT_Get_Outline_BBox := TT_Err_Ok;
end;
Mantis conversion info:
- Mantis ID: 37022
- Version: 2.0.8
- Fixed in revision: r63126 (#d96645d9)
- Monitored by: » circular (circular)