[MPlayer-dev-eng] [PATCH] dynamic font generation

Arpi arpi at thot.banki.hu
Thu Aug 15 21:49:07 CEST 2002


Hi,

> > Anyway, scanning the subtitles for all characters is maybe worth the
> > effort, especially for chinese at al.
> hmm, or generating them when they are needed instead of all at once might 
> avoid some problems, like not knowing all future displayed chars (network 
> stream, ...)

agree.
we should do draw+outline+blur when we display a new subtitle.
so no fonts/chatsets at all, if we need to display a new subtitle, then
render the text to a new white bitmap, then outline then blur.
with the new sub/osd layer you have todo it only onve a sub changes, and
keep this bitmap while the sub is visible.
advantages:
- outline+blur code could be used for dvd subs too, they are ugly now
- solves the overlapping outline/shadow problem
- no startup delay, no bitmap font files required
- runtime change of font type, size, outline width, color, etc...
  it could make it possible to use bold, italic mixed in subs!
  (later: html renderer, browser on osd - users could browse the docs 
   while watching the film :))
disadvantages:
- displaying subtitles requires a bit stronger cpu
- user needs to have .ttf files
- user needs to have libfreetype2

we should benchmark how many cpu is required to outline&blur an average
sized subtitle.

we could develop very fast outlining routine, and then use swscaler's blur.


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list