[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] How to port freetype2 to a system without file system (Re
From: |
duhuanpeng |
Subject: |
Re: [ft-devel] How to port freetype2 to a system without file system (Re: Freetype-devel Digest, Vol 158, Issue 16) |
Date: |
Tue, 13 Mar 2018 09:54:59 +0800 |
> Hello,
> I have ported freetype2 to our system.
> Our system don't supports file system, so I write some functions to
> emulate file operations.
> fopen, fread, etc.
> But now I maintain a "FILE" array, it
> eats a lot memory.
> Is there any better way to port
> freetype2?
> Our fonts are store in flash, it
> appears like a normal array.
> like:
> extern char font1[];
> extern char font2[];
> (actually, I store multi font files in a single romfs image block.)
>Can you not use FT_New_Memory_Face() ? That treats a block of memory
> as a font file. You should be able to pass font1, font2 directly as
> the 2nd argument to FT_New_Memory_Face() .
Hi, I will try this.
Should I leave the ftsystem.c unchanged?
Regards,
duhuanpeng