[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] How to port freetype2 to a system without file system (Re: Fr
From: |
Hin-Tak Leung |
Subject: |
[ft-devel] How to port freetype2 to a system without file system (Re: Freetype-devel Digest, Vol 158, Issue 16) |
Date: |
Mon, 12 Mar 2018 16:39:16 +0000 (UTC) |
> Message: 1
> Date: Mon, 12 Mar 2018 23:25:08 +0800
> From: "duhuanpeng" <address@hidden>
> To: <address@hidden>
> Subject: [ft-devel] How to port
> freetype2 to a system without file
> system
> 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() .
- [ft-devel] How to port freetype2 to a system without file system (Re: Freetype-devel Digest, Vol 158, Issue 16),
Hin-Tak Leung <=