Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
DynaPDF.FontInfo
Retrieves the most important properties of a font.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| DynaPDF | 5.1 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| The PDF reference returned from DynaPDF.New. | |||
| 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 file name for values returned as container values. For CMapBuf and FontBuffer. | "test.dat" | Optional |
Result
Returns value or error.
Description
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.
For embedded fonts the FontBufSize field is > 0.
Examples
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]
Loop
#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]
#Next
Set Variable [$Index; Value:1 + $Index]
Exit Loop If [$Index >= $FontCount]
End Loop
End If
See also
- DynaPDF.GetFontCount
- DynaPDF.ImportPDFFile
- DynaPDF.New
- DynaPDF.OpenPDFFromContainer
- DynaPDF.SysFontInfo
Example Databases
Blog Entries
Created 21st March 2015, last changed 20th December 2019
DynaPDF.FlushPagesEx - DynaPDF.FreeTextAnnot
Feedback: Report problem or ask question.
Links
MBS FileMaker Plugins