freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] [PATCH 2/2] [cmake] add support for customized ftsystem o


From: Azamat Hackimov
Subject: Re: [ft-devel] [PATCH 2/2] [cmake] add support for customized ftsystem on Windows
Date: Tue, 31 Oct 2017 13:57:03 +0500

Hello.

> > I think you need to explain better (1) why special-casing and
> > forking is necessary,
>
> ... this argument.

For one project which I contribute to, we need some mechanism that
loads specific FontFace from file. Currently we are using little
quirky approach what messing with FreeType's internal structures, so
actually we bundled library into our code. My intention is externalize
it.
The problem is that we can get a situation where the user uses
non-standard fonts in Windows with Unicode in the pathname. Standard
fopen() call in Windows can't handle Unicode, you need to use
_wfopen(). On Linux and macOS there no problem, since standard fopen()
can handle with Unicode names.
We can use FT_New_Memory_Face(), that works on already opened stream,
yes, but in this case we forced to load whole file into memory which
is in some cases leads to useless memory consumption.
I carefully studied docs/CUSTOMIZE from sources and figured out that
forking system interface for platform specific issue would be best
approach. I can do same with "#ifdef WIN32" hacks in
src/base/ftsystem.c, but I'm think, this is a not clean solution.

>
> > Also, fopen on windows can open non-ascii file names, I think.  It
> > is just a byte stream.
>
> The problem is non-ASCII encoded *file names* not the contents of
> files.
>
> Azamat, there have been already some other follow-up e-mails on the
> e-mail list, so please subscribe and discuss!

I'm little confused, where is discussion going on? Here on
freetype-devel or somewhere else?

-- 
>From Siberia with Love!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]