For TTFs, get unicode mappings for charcodes from cmap table

With this PR, for TTFs we no longer rely solely on the ToUnicode CMap table to getting the mapping from char codes to unicodes. Instead, we use the information in the cmap table if it is available.

Fixes #1512.