freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Two very minor freetype patch suggestions


From: mpsuzuki
Subject: Re: [ft-devel] Two very minor freetype patch suggestions
Date: Mon, 11 Jun 2007 19:41:39 +0900

Dear Sir,

On Sat, 2 Jun 2007 01:18:07 +0900
address@hidden wrote:
>Thank you for sending new patches for ftmac.c,
>I will check them within 1 weeks. Please wait.

Sorry for lated reply. I have 2 questions.

>--- src/base/ftmac.c   2007-06-11 18:34:19.000000000 +0900
>+++ ../ftmac.c 2007-06-11 18:28:51.000000000 +0900
>@@ -105,6 +105,10 @@
>                             FSSpec*      pathSpec,
>                             FT_Long*     face_index )
>   {
>+    (void)fontName;
>+    (void)pathSpec;
>+    (void)face_index;
>+    
>     return FT_Err_Unimplemented_Feature;
>   }

I think these declarations are introduced to avoid 
compilers warning against unused arguments. FreeType2
has macros for such purpose: FT_UNUSED(). So I rewrote
these parts as
>+    FT_UNUSED( fontName );
>+    FT_UNUSED( pathSpec );
>+    FT_UNUSED( face_index );
If I'm misunderstanding, please let me know.
 

>@@ -466,13 +481,14 @@
>                                     NULL, NULL, NULL, &par_ref ) )
>       return FT_Err_Invalid_Argument;
> 
>+    /* This gives a path in POSIX format */
>     if ( noErr != FSRefMakePath( &par_ref, path_lwfn, path_size ) )
>       return FT_Err_Invalid_Argument;
> 
>     if ( ft_strlen( (char *)path_lwfn ) + 1 + base_lwfn[0] > path_size )
>       return FT_Err_Invalid_Argument;
>
>-    /* now we have absolute dirname in lookup_path */
>+    /* now we have absolute dirname in path_lwfn */
>     if ( path_lwfn[0] == '/' )
>       ft_strcat( (char *)path_lwfn, "/" );
>     else

According to Apple TN #2078, as you wrote,
FSRefMakePath() is primarily introduced to
get POSIX + UTF8 pathname from FSRef. But
the technote mentions about the possibility
of FSRefMakePath() returns HFS ptahname.
If we restrict the scope to Mac OS X,
FSRefMakePath() always returns POSIX + UTF8
pathname delimited by "/" ? If so, the code
checking the delimiter ("/" or ":") can be
removed.
 
Regards,
mpsuzuki




reply via email to

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