libjass
libjass copied to clipboard
Support kfx
- [x] \k ~~should be trivial to implement with
animation-timing-function: step-end
~~ Done. - [ ] \ko is harder - there's no CSS property to animate.
- [ ] \K's sweeping behavior may be impossible to do with just CSS - might require two overlapping spans and an animated width. Also see [https://stackoverflow.com/questions/23569441/is-it-possible-to-apply-css-to-half-of-a-character](this SO question.)
I just read this article and found mix-blend-mode maybe helpful for \K
or \kf
, but it seems mix-blend-mode has to work with background, it may still hard to implement \K
. And browser support is also a problem.
It doesn't just work with background. It works with anything behind it. The reason your link uses background-color
is to just get a solid colored rectangle of varying width behind the text.
I'd discovered it from this article two weeks ago and thought about using it for the functional tests (by overlaying the "expected" image on to the "actual" video and applying mix-blend-mode: difference
, see http://jsfiddle.net/ekeewj53/). But you're right, it will be useful for \K as well.