freetype-devel
[Top][All Lists]
Advanced

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

[Devel] FreeType 2.1.3 Mac Carbon **BUG** - Can't open .ttf file with pa


From: Steve Sexton
Subject: [Devel] FreeType 2.1.3 Mac Carbon **BUG** - Can't open .ttf file with path separators
Date: Sat, 25 Jan 2003 23:30:59 -0500

Hi,

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:

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. At least not when used with the MSL C libraries in CW Pro 8. This change appears to have been introduced in rev 1.22 of the file. I checked CVS and it appears to still be a bug in the current dev baseline.

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. 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. Note I haven't tried this myself to see if the doc is correct. Please no flames about supporting OS 8.6/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 separator. However, later on in the code an fopen() is done against the same string. fopen, at least with MSL, requires using the : (colon) path separator. So if you have any path separators in your filename you've got a catch 22, and can't open the file. A filename only (like FOO.ttf) would probably work, but a full path (like /Users/ssexton/Library/Fonts/FOO.ttf) won't.

In case it matters, I'm building with CWPro 8.3 and Mac OS X 10.2.3.

Regards,
  Steve Sexton
  address@hidden

PS. I'm not subscribed to the devel list, however this was the e-mail given for bug reports in the README. So if you have further comments/questions for me about this, mail me directly.




reply via email to

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