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:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Sets the Text rendering font.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 2.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
ImageRef | The image reference number. | 1 |
value | The new value. |
Returns "OK" on success.
Picks a ubuntu regular font:
MBS("GMImage.SetFont"; $ref; "@/usr/share/fonts/truetype/ubuntu/Ubuntu-R.ttf")
Annotate an image on an Ubuntu FileMaker Server:
Go to Layout [ “Annotate Test” ; Animation: None ]
Go to Record/Request/Page [ First ]
Set Variable [ $ref ; Value: MBS( "GMImage.New"; "200x200"; "white" ) ]
# Settings for the font
Set Variable [ $r ; Value: MBS("GMImage.SetFontPointsize"; $ref; 12) ]
Set Variable [ $r ; Value: MBS("GMImage.SetFont"; $ref; "@/usr/share/fonts/truetype/ubuntu/Ubuntu-R.ttf") ]
Set Variable [ $r ; Value: MBS("GMImage.SetFillColor"; $ref; "RGB 0 0 0") ]
# Write the text to the picture
Set Variable [ $r ; Value: MBS("GMImage.Annotate"; $ref; "Hello World"; "100x200+10+40"; 1) ]
# store the picture in the field
Set Field [ WebHook Chat::File ; MBS( "GMImage.WriteToPNGContainer"; $ref ) ]
Commit Records/Requests [ With dialog: Off ]
# Free image
Set Variable [ $Error ; Value: MBS("GMImage.Free";$ref) ]
This function checks for a license.
Created 18th August 2014, last changed 17th February 2023