I think Xojo inc should comment on what the behavior actually is and if they support OTF as well as ttc files
As you are a font expert let me ask you about the flags. The info fro TSType I found said
Note: In the following algorithm, x represents a bit that may be ignored.
But 2 things are not clear to me… From hat this says I would interpret no bits sets to be embeddable… But is that a safe assumption or might to jus mean step author simply did not use that field and might restrict embedding in the human readable license? In other words should I depend only on setting that explicitly permit embedding?
Also I read that the OS/2 table itself is optional.
If the OS/2 Table is not present, should I assume the font is or is not embeddable? Should I not assume it is in that case unless a human readable license says it is?
First the old ones…
Can you clarify support .otf ,.ttc, .otc font files as well a opentype fonts that are NOT based on truetype outlines… And will addFonts NOT embed fonts that have the bit sent not to allow embedding?
Now the new question:
Fonts can have more styles besides plain, Bold Italic and BoldItalic… the can have different weights like Light, Mediums Semi-bold and Black (and they are often packaged together in etc font file). Is there any way to use these fonts styles in the Xojo PDF implementation?
BTW I have written some Xojo code to get the font info both from ttf font files as well as for all the fonts contained in etc files where on can get information on all the styles/weights available…
One thing I don’t know how to deal with are variable weight fonts with respect to that.
I know…BUT by the spec it can also contain truetype outlines. I know the Xojo implementation supports truetype outlines … I was asking if it supported postscript ones as well.
I know… I looked at the TrueType and OpenType specs and wrote Xojo code to read the tables I care about. I can pull out the the style information on each font in the file… Usually the names of the styles are supplied in the name table in all the languages the fonts support… I wrote my code to pull out the english ones so I could read them!
I can also pull out the name of the company that made it, copyright info , as well as for most fonts , if the font is embeddable ,and if embeddable if the font grants permission for the document to be editable or if the font can be subsetted when embedded, as well as font metrics such as units per em… This is for any truetype or opentype font.
.ttf, .ttc and .otf (TrueType) fonts are supported on PDFDocument. You’ll get the best experience using .ttf font files. With these you can use any of the provided styles, while when using .otf the mileage may vary (usually limited to Regular face).
If the font has the copy protection flags set enabled it is not embedded.
Also, and if you are on macOS, probably you will find of interest the example project found at Example Projects > Platform-Specific > macOS > macOSSystemFonts.xojo_binary_project