split into multiple files. yucky fontparams object to store state.