Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
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