[vlc-devel] [PATCH 38/41] Add OS/2 support to freetype module

KO Myung-Hun komh78 at gmail.com
Wed Oct 12 14:19:55 CEST 2011



Rémi Denis-Courmont wrote:
> 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.
> 

Yes, but it's only for non-array variable. I don't think that array of
them as a string has the same effect. Can we expect that the 10th
element of uint16_t array and one of uint32_t array are same ?

>>
>>>> +# 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.
> 
> 

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.0.14
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1GHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr




More information about the vlc-devel mailing list