Add-SPOFontPackage
Creates a new custom font package with fonts in the brand fonts library.
Syntax
Default (Default)
Add-SPOFontPackage
-Title <String>
-PackageJson <String>
[-IsHidden <Boolean>]
[<CommonParameters>]
Description
This cmdlet creates a new brand font package for the tenant. Each font package must have a unique name. The font file must be added to the SharePoint Brand Center before creating a font package. For more information, see Brand Fonts.
Examples
EXAMPLE 1
$packageJson = @'
{
"fontFaces": [
{
"fontFamily": "Tahoma",
"path": "Tahoma.ttf",
"fontType": "contentFont"
}
],
"fontSlots": {
"title": {
"fontFamily": "Tahoma",
"fontFace": "Regular",
"fontVariationSettings": {
"wght": 100,
"wdth": 100
}
},
"heading": {
"fontFamily": "Tahoma",
"fontFace": "Regular",
"fontVariationSettings": {
"wght": 100,
"wdth": 100
}
},
"body": {
"fontFamily": "Tahoma",
"fontFace": "Regular",
"fontVariationSettings": {
"wght": 100,
"wdth": 100
}
},
"label": {
"fontFamily": "Tahoma",
"fontFace": "Regular",
"fontVariationSettings": {
"wght": 100,
"wdth": 100
}
}
}
}
'@
Add-SPOFontPackage -Title "Tahoma" -PackageJson $packageJson
This example creates a new font package named "Tahoma" with specified JSON configuration.
EXAMPLE 2
# With $packageJson from EXAMPLE 1
Add-SPOFontPackage -Title "Contoso Font Package" -PackageJson $packageJson -IsHidden $true
This example creates a hidden font package with specified JSON configuration.
Parameters
-IsHidden
Applicable: SharePoint Online
Specifies whether the font package should be hidden from users. When set to $true, the font package will not be visible in the Change the look options, but can still be applied using the Set-SPOFontPackage cmdlet.
Parameter properties
| Type: | System.Boolean |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-PackageJson
Applicable: SharePoint Online
Specifies the JSON configuration for the font package.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Title
Applicable: SharePoint Online
Specifies the display name of the new font package.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.