[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] FreeType 2.1.3 Mac Carbon **BUG** - Can't open .ttf file wit
Re: [Devel] FreeType 2.1.3 Mac Carbon **BUG** - Can't open .ttf file with path separators
Wed, 12 Feb 2003 13:50:46 -0500
At 11:30 PM -0500 1/25/03, Steve Sexton wrote:
I just recently started trying to use FreeType 2.1.3, and on the
first test found a bug in the Mac OS Carbon version. I have a
solution as well. I'll try to keep this short and sweet:
Let's see what you've got ;).
In src/base/ftmac.c, at line 90 in function file_spec_from_path:
change #if TARGET_API_MAC_CARBON to #if 0. Or better, just
delete the whole "Carbon" part of the #if. IT DOESN'T WORK.
That's surprising as it has been working fine for many folks
folks for the last year or so since I first added that code. Now, I
admit that I haven't tried it with CW8 - but still...
There are three problems with this block of code:
1. It isn't needed to compile under Carbon. The #else block works
fine. You lose support for paths > 255 characters, but that is
likely a necessary evil.
I am unwilling to accept that as a "necessary evil". The
code MUST work with ALL possible valid pathnames.
2. The use of FSPathMakeRef function, per Apple's doc, means that
the library will not work on OS 8.6/9 only OS X, as this call isn't
implemented in OS 8.6/9 Carbon API's, only OS X Carbon API's.
That is NOT what the headers say:
* Non-Carbon CFM: not available
* CarbonLib: in CarbonLib 1.1 and later
* Mac OS X: in version 10.0 or later
Plus, this code HAS been tested on Mac OS 9.x by myself and others.
Note I haven't tried this myself to see if the doc is correct.
Please no flames about supporting OS 8.6/9.
FT2 fully supports Mac OS 9...
3. This is the doozy, and why it keeps you from opening a file with
path chars. FSPathMakeRef requires using / (slash) as the path
Correct. It assumes a Posix path.
However, later on in the code an fopen() is done against the same
string. fopen, at least with MSL, requires using the : (colon) path
That's a bug in the MSL then, since it should (like fopen()
in the standard C lib shipped with Mac OS X) support BOTH as valid
path separators. And it sounds like a new bug in the MSL, since this
used to work just fine with CWPro7.
Leonard Rosenthol <mailto:address@hidden>
- Re: [Devel] FreeType 2.1.3 Mac Carbon **BUG** - Can't open .ttf file with path separators,
Leonard Rosenthol <=