[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Patch: enable UTF8 path names on Windows
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] Patch: enable UTF8 path names on Windows |
Date: |
Sat, 11 Apr 2009 08:37:50 +0200 (CEST) |
> Now I had to revisit this problem (because we use Freetype, and it
> can't open those files on Windows). I did the same approach: on
> Windows, do not map ft_fopen directly to fopen(), instead map to a
> function that first tries fopen(), and if that fails converts path
> from UTF-8 into UTF-16 and tries _wfopen().
>
> Attached a patch (against Freetype 2.2.1).
This is ooold. The current version is 2.3.9, and I strongly suggest
to upgrade.
> Tested to compile (using Visual Studio 2003) and work on Windows.
> Might not work on Windows 9x systems though (they don't have Unicode
> support built in).
Thanks. Can you make it more platform specific? The right solution
IMHO is to provide a special ftstdlib.h version in builds/win32. This
new header file would simply load the generic ftstdlib.h file, then
redefing the macros as needed. Similarly, src/base/ftsystem.c should
not be tainted with platform specific stuff. Again, a file ftsystem.c
should be generated in builds/win32.
Werner