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

Michael Van Canneyt michael at freepascal.org
Thu Nov 2 14:00:19 CET 2023



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 LoadFromFile(const AFileName : String);
>    Procedure LoadFromStream(AStream: TStream); virtual;

Yes, but the font cache/manager in fpttf does not support this, and all font access happens
through the font cache. (at least that is how I understood Mattias' request)

Michael.


More information about the fpc-pascal mailing list