[pdf] Fix OpenType CFF embedding

While OpenType is a singular format, PDF doesn't treat it that way. Most
viewers don't care how the PDF describes the font data, they just ship
it off to their font interpreter which figures out what the format is.
However, some viewers require strict adherence to the PDF specification
to recognize OpenType with CFF outlines.

This means setting the /Font's /Subtype to /CIDFontType0 (instead of
/CIDFontType2 for glyf outlines), using /FontFile3 instead of /FontFile2
in the /FontDescriptor, and setting /Subtype /OpenType on the font data
stream dictionary.

Bug: 342510496
Change-Id: Id4bedaea3e905f912c6120d1d2da8ee2d036e892
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/869037
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
3 files changed