Made font a struct and made all structs serializable. Made test for
serialization as well.