Re: [fpc-pascal] Creating capturers

2023-11-02 Thread Hairy Pixels via fpc-pascal
> On Nov 2, 2023, at 1:44 PM, Sven Barth wrote: > > Now for nested as well as anonymous routines the compiler determines whether > a capturer is required at the point that the nested or anonymous routine is > assigned to a function reference (cause otherwise it can be handled as a > nested

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Mattias Gaertner via fpc-pascal
On 02.11.23 16:42, Mattias Gaertner via fpc-pascal wrote: On 02.11.23 14:00, Michael Van Canneyt via fpc-pascal wrote: On Thu, 2 Nov 2023, Alexey Torgashin via fpc-pascal wrote: How to load a custom font from a stream instead of from a file? Currently no way to my knowledge, But

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Michael Van Canneyt via fpc-pascal
On Thu, 2 Nov 2023, Mattias Gaertner via fpc-pascal wrote: On 02.11.23 14:00, Michael Van Canneyt via fpc-pascal wrote: On Thu, 2 Nov 2023, Alexey Torgashin via fpc-pascal wrote: How to load a custom font from a stream instead of from a file? Currently no way to my knowledge, But

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Mattias Gaertner via fpc-pascal
On 02.11.23 16:58, Michael Van Canneyt via fpc-pascal wrote: [...] Yes, absolutely. But we may need a ref. counting mechanism then. Or at least we need to decide who 'owns' the streams; At first sight it seems to me the gTTFontCache should own all font streams. Yes. On second thought,

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Mattias Gaertner via fpc-pascal
On 02.11.23 14:00, Michael Van Canneyt via fpc-pascal wrote: On Thu, 2 Nov 2023, Alexey Torgashin via fpc-pascal wrote: How to load a custom font from a stream instead of from a file? Currently no way to my knowledge, But fpparsettf.pp has this:  TTFFileInfo = class(TObject)  ...  

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Mattias Gaertner via fpc-pascal
On 02.11.23 13:38, Alexey Torgashin via fpc-pascal wrote: How to load a custom font from a stream instead of from a file? Currently no way to my knowledge, But fpparsettf.pp has this:   TTFFileInfo = class(TObject)   ...   public     // Load a TTF file from file or stream.    

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Michael Van Canneyt via fpc-pascal
On Thu, 2 Nov 2023, Alexey Torgashin via fpc-pascal wrote: How to load a custom font from a stream instead of from a file? Currently no way to my knowledge, But fpparsettf.pp has this: TTFFileInfo = class(TObject) ... public // Load a TTF file from file or stream. Procedure

Re: [fpc-pascal] Creating capturers

2023-11-02 Thread Hairy Pixels via fpc-pascal
> On Nov 2, 2023, at 1:44 PM, Sven Barth wrote: > > The most important piece of knowledge is that in a routine with nested (or > anonymous) routines the nested (or anonymous) routines aren't compiled down > to machine code right away. The compiler first parses the whole hierarchy > until

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Alexey Torgashin via fpc-pascal
How to load a custom font from a stream instead of from a file? Currently no way to my knowledge, But fpparsettf.pp has this: TTFFileInfo = class(TObject) ... public // Load a TTF file from file or stream. Procedure LoadFromFile(const AFileName : String); Procedure

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Michael Van Canneyt via fpc-pascal
On Thu, 2 Nov 2023, Mattias Gaertner via fpc-pascal wrote: Hi, How to load a custom font from a stream instead of from a file? Currently no way to my knowledge, but I am open for patches ! Michael. ___ fpc-pascal maillist -

[fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Mattias Gaertner via fpc-pascal
Hi, How to load a custom font from a stream instead of from a file? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Creating capturers

2023-11-02 Thread Sven Barth via fpc-pascal
Am 01.11.2023 um 06:18 schrieb Hairy Pixels via fpc-pascal: I'm curious how the capturer is created in the case of anonymous functions. I know the function needs to create a capturer when nested functions are declared but what happens if there is an anonymous function which is declared in the