Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 8.2   8.3   8.4   8.5   9.0   9.1   9.2   9.3   9.4   9.5    Statistic  


Retrieves the most important properties of a font.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 5.1 Yes Yes Yes Yes Yes
MBS( "DynaPDF.FontInfo"; PDF; Index; Selector { ; FileName } )   More


Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
Index The font index from zero to DynaPDF.GetFontCount. 0
Selector Which value to return. Can be Ascent, AvgWidth, BaseEncoding, BaseFont, CapHeight, CharSet, CharSetSize, CIDOrdering, CIDRegistry, CIDSet, CIDSetSize, CIDSupplement, CIDToGIDMap, CMapBuf, CMapBufSize, CMapName, Encoding, FirstChar, FontBBox, Flags, FontBufSize, FontBuffer, FontFamily, FontFilePath, FontFileType, FontName, FontStretch, FontType, FontWeight, FullName, HaveEncoding, HorzWidths, HorzWidthsCount, Imported, ItalicAngle, Lang, LastChar, Leading, Length1, Length2, Length3, MaxWidth, Metadata, MetadataSize, MisWidth, Panose, PostScriptName, SpaceWidth, StemH, StemV, ToUnicode, ToUnicodeSize, VertDefPos, VertWidths, VertWidthsCount, WMode or XHeight. "FamilyName"
FileName Optional
Optional file name for values returned as container values. For CMapBuf and FontBuffer.


Returns value or error.


Retrieves the most important properties of a font.
CMapBuf and FontBuffer values are returned as container values.
HorzWidths is returned as a list of floating point numbers separated by newline character.
VertDefPos is returned as two floating point numbers for X and Y separated by space character.
VertWidths is returned as list of three floating pointing numbers. First is width, second X and third value is Y.
FontFamily, FontFilePath, FullName and PostScriptName are returned as unicode texts if possible.


Get Family Name for first font:

MBS( "DynaPDF.FontInfo"; $pdf; 0; "FamilyName" )

Create records with family name for each font in PDF file:

#Load PDF from container
Set Variable [$r; Value:MBS("DynaPDF.OpenPDFFromContainer"; $pdf; System Font Info::PDF)]
#import a page
Set Variable [$r; Value:MBS("DynaPDF.ImportPDFFile"; $pdf; 1)]
#List fonts in PDF
Set Variable [$FontCount; Value:MBS("DynaPDF.GetFontCount"; $pdf)]
If [$FontCount > 0]
    Set Variable [$index; Value:0]
        #Get values
        New Record/Request
        Set Field [System Font Info::FontFamily; MBS("DynaPDF.FontInfo"; $pdf; $Index; "FontFamily")]
        Commit Records/Requests [Skip data entry validation; No dialog]
        Set Variable [$Index; Value:1 + $Index]
        Exit Loop If [$Index >= $FontCount]
    End Loop
End If

See also

Example Databases

Blog Entries

Created 21st March 2015, last changed 23th March 2015

DynaPDF.FlushPages   -   DynaPDF.FreeTextAnnot

Feedback: Report problem or ask question.

MBS Xojo blog