Move chars to glyphs conversion to the worker.

First PR in the worker/main thread code split.