[vlc-devel] [RFC PATCH] freetype: using Pango for text layout
jb at videolan.org
Fri Jan 23 09:23:18 CET 2015
On 21 Jan, Salah-Eddin Shaban wrote :
> > It can take HTML-like or raw text, and display it.
> > And it supports many quirks with teletext and all. Including some
> > japanese half-glyphs.
> > Therefore this module parses the HTML/XML, then tries to render it using
> > freetype.
> > But that means that modules like QuartzText or DirectWrite, (or any
> > other) does not support the same set.
> Right. That's why I felt better working on the same module than on a
> separate one. And that's why I had to go with PangoFT.
I got that :)
> > Now what?
> > ---------
> > There are several path of actions, from now on...
> > 1) improve the FT module until it gets to Theory, and probably merge
> > harfbuzz library in it.
> > 2) create on API above libass so we can send text_style_t, and not only
> > ASS style
> > 3) create a new pango module for Unixes
> > 4) mplayer way: Transform all text into SSA and send to libass
> > 1) Difficult, but more portable and safe, for regressions
> > 2) Should be simpler, but question about merging in libass arises.
> > However, libass supports everything, including correct fallback
> > (well, almost, still fontconfig on Windows...)
> > So this is probably a libass fork
> > 3) Well, less portable, for iOS, Windows and Android.
> > 4) not sure it's the best idea, perf wise...
> Thanks for the detailed explanation. I'll probably look into the first
> option for starters. According to one of the developers of Pango and
> HarfBuzz, HarfBuzz only supports the shaping part of the process, and
> we have to do the itemizing part manually. The line breaking part is
> already there in the freetype module it just has to take into account
> RTL text.
I think this is correct.
> One last thing. As far as I know, Qt's QTextLayout performs the same
> operations that Pango does. Do you think we could use it here? It
> should be simpler than using HarfBuzz directly. Does Qt have any
> issues on certain platforms?
This is basically the same issue.
Qt will probably never fly on our version of VLC for Android, iOS or
As for complete portable text layouts, I know
- gtk (pango)
- our own? (lol)
With my kindest regards,
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel