[vlc-devel] [PATCH] Corrections to Freetype

Bernie Purcell b.purcell at adbglobal.com
Thu May 31 07:48:38 CEST 2007


On Mon, 2007-05-28 at 20:28 +0200, Jean-Paul Saman wrote:

> Provide more rational on certain kind of changes like:
>  > -static line_desc_t *NewLine( byte_t *psz_string )
>  > +static line_desc_t *NewLine( int i_count )
> Why is it needed what was wrong with the old way?
> 
The old way was passing through a string, which it was only using to
determine a strlen() on anyway. This was a little weird, but it worked.
The styled font rendering routine turns the string to UTF32 earlier on
in the sequence, though, so strlen() won't work on it, and it would be
absolutely ridiculous to create a UTF8 style representation of it just
so a function we are calling can do a strlen() on it to get the length -
it makes much more sense just to change the prototype to take a length
in the first place. :-)

I've fixed all of the malloc's that weren't being tested for NULL
pointers - it's a valid omission, thanks for picking them up. The other
comments, though, weren't really applicable. I've put comments in the
code to clarify.

This patch corrects the following:
* Not correctly processing multiple whitespace in styled subtitles, as
html should
* Mangling Bi-directional text when style information present (the major
part of the patch)
* Incomplete implementation of font size, as specified by USF spec
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freetype-bugfix.svn-diff
Type: text/x-patch
Size: 36151 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070531/3a099584/attachment.bin>


More information about the vlc-devel mailing list