Platforms to show: All Mac Windows Linux Cross-Platform

folderitem.FontActivateMBS(OnlyLocal as boolean) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Fonts MBS Util Plugin 4.3 Yes Yes No Yes No
Function: Activates one font.
Example:
dim f as folderitem
dim e as Integer

f=SpecialFolder.Desktop.child("MyWonderfulFont.dfont")
e=f.FontActivateMBS(true)

select case e
case 0
msgbox "No error"
case -1
MsgBox "Parameter error. (Plugin)"
case 1 // Windows error
MsgBox "Parameter error. (System)"
case -43 // Mac error
MsgBox "File not found."
case -50 // Mac error
MsgBox "Parameter error. (System)"
case -108 // Mac error
MsgBox "File is not a font file."
else
MsgBox "Error: "+str(e)
end Select
Notes:
The folderitem used here points to a font file.
If you want the Font Manager to make fonts not visible to all applications installed on the system, use the OnlyLocal property.

Requires Mac OS 9.0 or newer.
Returns -1 if this FontManager function was not found. 0 on success.

Some error codes for Mac:
0No error.
-43File not found.
-45File locked.
-108Out of memory.
-105Already registered.

Fails in Xojo 2017 on Windows due to changes in Xojo's way to handle fonts. The plugin still activates them, but Xojo doesn't allow you to use fonts which haven't been there earlier. See feedback case 46596.

Feedback, Comments & Corrections

folderitem.FontDeactivateMBS(OnlyLocal as boolean) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Fonts MBS Util Plugin 4.3 Yes Yes No Yes No
Function: Deactivates one font.
Notes:
The folderitem used here points to font file.
The OnlyLocal must match the value which was used on registration.

Requires Mac OS 9.0 or newer, Windows 2000/XP.
Returns -1 if this FontManager function was not found. 0 on success.

An user reported that this does not work on Mac OS X 10.4.

Some error codes for Mac:
0No error.
-43File not found.
-45File locked.
-108Out of memory.

On Windows you may need to call this function several times until all references of the file are freed.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Util Plugin.

The biggest plugin in space...




Links
MBS FileMaker Plugins