[vlc-devel] [PATCH] Corrections to Freetype
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
* 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...
Size: 36151 bytes
Desc: not available
More information about the vlc-devel