PDFDoc Fonts embedding questions

Two questions about that…
First let me say I am only interested in desktop.

HOW would one access the other faces besides the ones specified by the PDFGraphics style booleans (Bold, Italic)?

Secondly you said the other faces from ttf files… when you say that, do you also mean all the faces in a .ttc file?

[quote] 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

Ah I see… that is the same info I can get with my code from the font file tables, but it should be Xplatform. Though for my code the raw font Metric values values I get are in Font design units… this code looks like it returns the metrics in points… I would need to do the conversion which I am not 100% sure how to do yet.

While i do most of my coding on a Mac, I need everything I write to be X-Platform (desktop), but I can compare that info to what my code pulls out of the files.


You are too good for this applicaton.

To be fired, it needs t be placed in the Applications folder (else it will not works).

The menus are in all windows (not in the MenuBar), à la Windows.

Above each character, one await a number (its “value“, not here: you will have … the character…

It tooks me less time to trash the application that I wasted to download it ;).

Now, it may have its use (f you need it).

I asked that because In some ways I guess I am stuck in the last century back when Font styles could be created when needed by quickdraw and the only styles were Bold, Italic and Underline.

I have not looked at the results of the strings returned from the Font method for over a decade at least, as I have not needed to code anything where the end user choses a font, and even then it was rare for me to need that.

The way things are done today the Bold and Italic booleans no longer make sense as if a font does not have that face, as they have no effect (fail silently) … But removing the booleans would break too much code that does work and I would not want them removed…

That was the root of my confusion.

Looking at the result of the font method now, combined with some understanding of Truetype and OpenType fonts, I see that what the Fonts method is returning is what the Truetype spec calls the FullName from the Name table, which has the face style in the name.

But looking at the font method results on my Mac, I see something else I don’t understand… I see Fonts for which I don’t see a corresponding Font file in the system fonts folder. For Example one is “Arial Hebrew”… Where does it come from?

Also as I don’t see a font file for it I don’t know what type of font it is, and if it can be used in PDFs .

I am thinking of assembling a font menu specifically for PDF Creation- As I can read the info in OTF and OTC font files, for those that I know their location, I can determine if they have TrueType outlines as well as if they are embeddable, so if they are usable in PDFs or not…

For that type of Font (one returned by the Fonts Method but has no corresponding file in the System Fonts Folder) is the only way to to see if is usable in a PDF is to try to assign it to a PDFGraphics object and see if one gets an exception, or would there be a silent substitution?


I don’t know what your primary OS is but just to revisit this…

According to:

So most Windows system fonts are embeddable.


Nice idea.

We can add a Font using the Font Book application. One thing I never checked is… where reside the added Font ?
In the Fonts folder or where it was when added ?
Just a question that arise while reading your txt.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.