[vlc-devel] Re: [PATCH] Quartz subtitle renderer

Derk-Jan Hartman hartman at videolan.org
Fri Mar 30 15:25:02 CEST 2007


On 30-mrt-2007, at 8:55, Bernie Purcell wrote:
> Warning: the patch below adds a new file: modules/misc/quartztext.c  
> that
> may need to be svn 'add'ed to repository.
>
> The module itself should be pretty straightforward, but a few  
> things to
> note:
> 1) I've set the module's score to be higher than freetype because I
> can't get into the preferences pane on OS X any more to configure it
> there - this was the only way I could test it. Whether or not you  
> leave
> it at the score it's at is up to you I guess.

Good call

> 2) it doesn't rely on the last patch I submitted, but without it the
> only subtitle type that can render styled subtitles is a USF stream
> muxed into a mkv container.

Tested both, works on a SSA file

> 3) If you find the rendered text excessively yucky you can try  
> changing
> the 2nd argument to CGContextSetLineWidth at line 814 to set the
> thickness of the outline. I found this made noticeable differences to
> the text output, but it varied so much with the font chosen that I
> couldn't come up with a systematic way of setting it appropriately  
> for a
> random font. It should probably be a configuration parameter - as I
> can't get the preferences working though I had no opportunity to play
> around with that prospect though.

This is looking VERY promising. couple of things:

1: positioning seems problematic at times with SSA, not really sure  
where that's coming from, haven't looked into it yet. But http:// 
deneb.student.utwente.nl/~hartman/videolan/Those_Who_Hunt_Elves_II_- 
_0.mkv shows it really well. I guess some margin values or stuff that  
need to be inherited from the input fmt are not copied over.

2: on plain text the last char appears to be missing at times. For  
example. Try the hotkeys for audio-track subtitle-track ('l' vs.  
's' ) The text doesn't show the ']' that should be at the end of the  
language tag ('[English]')

3: I do think that a thicker black outline should be used in a lot of  
cases. It's currently 1.0f, which by my interpretation of the spec  
means 0.5 on either side of the graphic. I was wondering if we can  
make it relative to the fontsize by default. Personally i think that  
would result in the best visual appearance for most people. And then  
have 1.0f as the minimum value unless "no border" is requested.

Looking really fine though !

DJ

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list