Add typeface factory registry

Based on the registration pattern of SkCodec, allow typeface factories
to be registered. This replaces and expands the existing special casing
for the deserialization of SkUserTypefaces with SkCustomTypefaceBuilder.

When a typeface is to be serialized, allow it to specify a prefered
factory for deserialization in its font descriptor. On deserialization
prefer a typeface factory with the matching factory identifier.

As an implementation detail, this required the introduction of a
concrete SkTypeface_FreeType subclass for the FreeType factory
implementation to return. This change uses this implementation to
replace a number of similar subclasses which were previously unshared
between font manager implementations.

Bug: skia:3929, chromium:1271939
Change-Id: I63cc19ea62832e51db1f7c35547017db435e0faf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/642517
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
32 files changed