Recent

Author Topic: [LazFreeType] Patches  (Read 58420 times)

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: [LazFreeType] Patches
« Reply #45 on: February 05, 2013, 01:23:12 am »
It is more complicated.

I recommend to read and understand the whole process before starting it --
the instructions should probably be adjusted to your configuration.

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: [LazFreeType] Patches
« Reply #46 on: February 16, 2013, 01:50:47 pm »
Here are two patches for LazFreeType.

- minimum size of 1 point, to avoid error with underlying procedures
- interpreter of true type program moved into one class (so it can be multithreaded) and dynamic stack size (this solves many fonts that use more stack than they declare)

EDIT : note that for multithreading to be ok, it is needed that an execution context be created for each thread
« Last Edit: February 16, 2013, 01:58:56 pm by circular »
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: [LazFreeType] Patches
« Reply #47 on: February 17, 2013, 05:44:20 pm »
Here is a patch for file access :
« Last Edit: February 17, 2013, 05:59:36 pm by circular »
Conscience is the debugger of the mind

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: [LazFreeType] Patches
« Reply #48 on: February 22, 2013, 01:49:08 pm »
this may include another small patch http://bugs.freepascal.org/view.php?id=23887

>>Here is a patch for file access :
I recently created a bug report about it http://bugs.freepascal.org/view.php?id=23888

interpreter_class.patch gives these errors on fpc2.7.1:
Code: [Select]
C:\lazarus\components\lazutils\ttinterp.pas(736,23) Hint: Mixing signed expressions and longwords gives a 64bit result
C:\lazarus\components\lazutils\ttinterp.pas(1140,51) Error: Incompatible types: got "TInterpreter.procedure Round_None(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1141,51) Error: Incompatible types: got "TInterpreter.procedure Round_To_Grid(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1142,51) Error: Incompatible types: got "TInterpreter.procedure Round_Up_To_Grid(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1143,51) Error: Incompatible types: got "TInterpreter.procedure Round_Down_To_Grid(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1144,51) Error: Incompatible types: got "TInterpreter.procedure Round_To_Half_Grid(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1145,51) Error: Incompatible types: got "TInterpreter.procedure Round_To_Double_Grid(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1146,51) Error: Incompatible types: got "TInterpreter.procedure Round_Super(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1147,51) Error: Incompatible types: got "TInterpreter.procedure Round_Super_45(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1288,27) Error: Incompatible types: got "TInterpreter.procedure Project_x(var TT_Vector;var TT_Vector):LongInt;" expected "<procedure variable type of function(var TT_Vector;var TT_Vector):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1294,27) Error: Incompatible types: got "TInterpreter.procedure Project_y(var TT_Vector;var TT_Vector):LongInt;" expected "<procedure variable type of function(var TT_Vector;var TT_Vector):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1299,27) Error: Incompatible types: got "TInterpreter.procedure Direct_Move(PGlyph_Zone;LongInt;LongInt);" expected "<procedure variable type of procedure(PGlyph_Zone;LongInt;LongInt);Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1300,27) Error: Incompatible types: got "TInterpreter.procedure Free_Project(var TT_Vector;var TT_Vector):LongInt;" expected "<procedure variable type of function(var TT_Vector;var TT_Vector):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1305,53) Error: Incompatible types: got "TInterpreter.procedure Project_x(var TT_Vector;var TT_Vector):LongInt;" expected "<procedure variable type of function(var TT_Vector;var TT_Vector):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1307,53) Error: Incompatible types: got "TInterpreter.procedure Project_y(var TT_Vector;var TT_Vector):LongInt;" expected "<procedure variable type of function(var TT_Vector;var TT_Vector):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1309,53) Error: Incompatible types: got "TInterpreter.procedure Project(var TT_Vector;var TT_Vector):LongInt;" expected "<procedure variable type of function(var TT_Vector;var TT_Vector):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1311,54) Error: Incompatible types: got "TInterpreter.procedure Project_x(var TT_Vector;var TT_Vector):LongInt;" expected "<procedure variable type of function(var TT_Vector;var TT_Vector):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1313,54) Error: Incompatible types: got "TInterpreter.procedure Project_y(var TT_Vector;var TT_Vector):LongInt;" expected "<procedure variable type of function(var TT_Vector;var TT_Vector):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1315,54) Error: Incompatible types: got "TInterpreter.procedure Dual_Project(var TT_Vector;var TT_Vector):LongInt;" expected "<procedure variable type of function(var TT_Vector;var TT_Vector):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1317,19) Error: Incompatible types: got "TInterpreter.procedure Direct_Move(PGlyph_Zone;LongInt;LongInt);" expected "<procedure variable type of procedure(PGlyph_Zone;LongInt;LongInt);Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1321,50) Error: Incompatible types: got "TInterpreter.procedure Direct_Move_X(PGlyph_Zone;LongInt;LongInt);" expected "<procedure variable type of procedure(PGlyph_Zone;LongInt;LongInt);Register>"
C:\lazarus\components\lazutils\ttinterp.pas(1323,50) Error: Incompatible types: got "TInterpreter.procedure Direct_Move_Y(PGlyph_Zone;LongInt;LongInt);" expected "<procedure variable type of procedure(PGlyph_Zone;LongInt;LongInt);Register>"
C:\lazarus\components\lazutils\ttinterp.pas(2725,25) Error: Incompatible types: got "TInterpreter.procedure Round_To_Half_Grid(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(2735,25) Error: Incompatible types: got "TInterpreter.procedure Round_To_Grid(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(2745,25) Error: Incompatible types: got "TInterpreter.procedure Round_To_Double_Grid(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(2755,25) Error: Incompatible types: got "TInterpreter.procedure Round_Up_To_Grid(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(2765,25) Error: Incompatible types: got "TInterpreter.procedure Round_Down_To_Grid(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(2775,25) Error: Incompatible types: got "TInterpreter.procedure Round_None(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(2786,25) Error: Incompatible types: got "TInterpreter.procedure Round_Super(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(2797,25) Error: Incompatible types: got "TInterpreter.procedure Round_Super_45(LongInt;LongInt):LongInt;" expected "<procedure variable type of function(LongInt;LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(4751,32) Error: Incompatible types: got "TInterpreter.procedure Read_CVT_Stretched(LongInt):LongInt;" expected "<procedure variable type of function(LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(4752,32) Error: Incompatible types: got "TInterpreter.procedure Write_CVT_Stretched(LongInt;LongInt);" expected "<procedure variable type of procedure(LongInt;LongInt);Register>"
C:\lazarus\components\lazutils\ttinterp.pas(4753,32) Error: Incompatible types: got "TInterpreter.procedure Move_CVT_Stretched(LongInt;LongInt);" expected "<procedure variable type of procedure(LongInt;LongInt);Register>"
C:\lazarus\components\lazutils\ttinterp.pas(4757,32) Error: Incompatible types: got "TInterpreter.procedure Read_CVT(LongInt):LongInt;" expected "<procedure variable type of function(LongInt):LongInt;Register>"
C:\lazarus\components\lazutils\ttinterp.pas(4758,32) Error: Incompatible types: got "TInterpreter.procedure Write_CVT(LongInt;LongInt);" expected "<procedure variable type of procedure(LongInt;LongInt);Register>"
C:\lazarus\components\lazutils\ttinterp.pas(4759,32) Error: Incompatible types: got "TInterpreter.procedure Move_CVT(LongInt;LongInt);" expected "<procedure variable type of procedure(LongInt;LongInt);Register>"
C:\lazarus\components\lazutils\ttinterp.pas(4952,13) Error: identifier idents no member "interpreter"
C:\lazarus\components\lazutils\ttinterp.pas(4955,12) Error: identifier idents no member "interpreter"
C:\lazarus\components\lazutils\ttinterp.pas(4957,40) Error: identifier idents no member "interpreter"
C:\lazarus\components\lazutils\ttinterp.pas(4972) Fatal: There were 38 errors compiling module, stopping
« Last Edit: February 22, 2013, 02:09:25 pm by zamtmn »

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: [LazFreeType] Patches
« Reply #49 on: February 22, 2013, 02:29:52 pm »
The patch changes not only ttinterpreter, but also ttobjs. Make sure you applied it to ttobjs.
Conscience is the debugger of the mind

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: [LazFreeType] Patches
« Reply #50 on: February 22, 2013, 02:49:19 pm »
Thank you. You are right

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: [LazFreeType] Patches
« Reply #51 on: March 02, 2013, 04:52:38 pm »
Patch for symbol fonts (WebDings, WebDings, WingDings) :
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: [LazFreeType] Patches
« Reply #52 on: March 02, 2013, 04:54:15 pm »
Patch to avoid exception when creating TFreeTypeStream :
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: [LazFreeType] Patches
« Reply #53 on: March 02, 2013, 05:18:47 pm »
Precalculate and check range start :
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: [LazFreeType] Patches
« Reply #54 on: March 02, 2013, 07:04:14 pm »
Handling TTC files, which are small collections. Called internal collections in this patch, to differentiate from font collection class.
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: [LazFreeType] Patches
« Reply #55 on: March 03, 2013, 08:52:25 am »
Line spacing fix (especially top margin).
Conscience is the debugger of the mind

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: [LazFreeType] Patches
« Reply #56 on: December 03, 2015, 12:57:15 am »
Fix TFreeTypeFont variables destructor calling if EasyLazFreeType.finalization section already worked

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: [LazFreeType] Patches
« Reply #57 on: December 04, 2015, 11:54:30 am »
Has all these patches been applied - there seems to be no confirmation on any of them? Why don't you guys use Mantis where patches can be more easily tracked. Or use Git or something so patches can be even easier tested by others.
« Last Edit: December 04, 2015, 11:56:06 am by Graeme »
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

TinyPortal © 2005-2018