Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,107
    • Issues 2,107
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 9
    • Merge requests 9
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • LazarusLazarus
  • LazarusLazarus
  • Issues
  • #37022
Closed
Open
Created May 05, 2020 by FPC Admin account@fpc_adminOwner

LazFreeType glyph bounds incorrect

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)
Assignee
Assign to
Time tracking