[vlc-devel] [PATCH 38/41] Add OS/2 support to freetype module
Rémi Denis-Courmont
remi at remlab.net
Tue Oct 11 19:10:59 CEST 2011
Le mardi 11 octobre 2011 14:36:33 KO Myung-Hun, vous avez écrit :
> Jean-Baptiste Kempf wrote:
> > On Mon, Oct 10, 2011 at 08:44:17PM +0900, KO Myung-Hun wrote :
> >> +#elif defined( __OS2__ )
> >> +# define DEFAULT_FONT_FILE "/psfonts/tnrwt_k.ttf"
> >> +# define DEFAULT_FAMILY "Times New Roman WT K"
> >
> > Ok.
> >
> >> +#ifdef __OS2__
> >> +# define UCHAR uint16_t
> >
> > Why can't it be uint32_t?
>
> As you see below, OS/2 uses UCS-2. And its size is 2 bytes.
Yes, but you can still fit unsigned 16-bits values in an unsigned 32bits
integer, so I don't really see the point.
>
> >> +# define FREETYPE_TO_UCS "UCS-2LE"
> >> +#else
> >> +# define UCHAR uint32_t
> >> +# if defined(WORDS_BIGENDIAN)
> >> +# define FREETYPE_TO_UCS "UCS-4BE"
> >> +# else
> >> +# define FREETYPE_TO_UCS "UCS-4LE"
> >> +# endif
> >> +#endif
> >>
> >> +#ifdef __OS2__
> >> + FcInit();
> >> +#endif
> >
> > Why do you need FcInit, when other OS don't?
>
> FontConfig port for OS/2 require this. It is not a direct port of
> FontConfig. It has been written to provide equivalent features.
>
> >> - i_string_length = i_string_bytes / 4;
> >> + i_string_length = i_string_bytes / sizeof( UCHAR );
> >
> > sizeof( *psz_tmp ); maybe
>
> Ok.
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the vlc-devel
mailing list