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,106
    • Issues 2,106
    • 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
  • #35627
Closed
Open
Created May 24, 2019 by FPC Admin account@fpc_adminOwner

AVLTree for TFreeTypeFont add glyphs every time want to render them.

Original Reporter info from Mantis: mamrezo
  • Reporter name: Muhammad Reza Zare

Description:

AVLTree for TFreeTypeFont add glyphs every time want to render them.
I`m using BGRABitmap to render forms in fpGUI,
After a while just looking for memory usage of and compare to fpGUI native canvas!
And any invalidate of forms cause of increasing memory usage!

Another thing That closing App cause of hanging it, Pause of the app in debug mode guide me to the freeing the AVLTree nodes, Nodes of the TFreeTypeFont.
A simple trace showed me that GetGlyph just adds any glyph again on the tree! Because of the added glyphs sorts by the AVLTree logic not by Index key of the TFreeTypeFont objects!
I set an onCompare method for AVLTree and problem solved!
The code you can find here :
https://forum.lazarus.freepascal.org/index.php/topic,45503.0.html

Steps to reproduce:

Try to Draw text with noGUI with BGRABitmap and Freetype based on LazUtil
Any glyph of the font will add every time of a character will draw.

Mantis conversion info:

  • Mantis ID: 35627
  • OS: ArchLinux
  • OS Build: 5.0.13-arch1-1-A
  • Platform: FPC 3.3.1 svn AMD64
  • Version: 2.1 (SVN)
  • Fixed in revision: r61291 (#5b5ad757)
Assignee
Assign to
Time tracking