[vlc-devel] Re: [PATCH] italic tag support fo MPL2 subtitles
Derk-Jan Hartman
hartman at videolan.org
Sat Feb 24 15:54:43 CET 2007
On 21-feb-2007, at 23:36, Antoine Cellerier wrote:
> I'm not sure if this is relevant to what you're doing (and to the
> whole
> "How do we store inline text styles in VLC" question), but parts of
> VLC,
> like the subsdec.c module already use a text_style_t structure defined
> in include/vlc_osd.h. It don't think that it's designed to be inlined
> into text but it'd be a good idea IMO to see how you can integrate
> your
> current patch with what's already been done concerning text styles.
> AFAIK thedj did most of the work on that part of the text renderer
> so he
> should be able to help.
>
> (I'm not even sure if this info is currenlty used by the
> renderer... but
> it exists)
It is used by freetype yes. I designed this.
It allows you change the formatting per "dataset" (line) submitted to
the renderer. The best way to add inline formatting, which this
italics discussion is dealing with: is to expand on this following:
The best is always to keep this language and renderer independent.
Operating systems use structs which allow for an almost infinite
amount of "formatting runs".
Ergo. with the line you send a an array with one or more :
<begin> - <end> formattype [argument]
with begin and end being int's indicating character positions in the
string, formattype being italics/bold/size/font whatever, and
argument being fontsize, the fontname etc.
However, the communication between renderer and decoder in that case
should likely be in unicode and not in UTF-8, because it's quite
annoying to account for character position if you are using UTF-8
escaping.
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