|
| 1 | +--- |
| 2 | +external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml |
| 3 | +Module Name: Microsoft.Online.SharePoint.PowerShell |
| 4 | +online version: https://learn.microsoft.com/powershell/module/sharepoint-online/add-spofontpackage |
| 5 | +applicable: SharePoint Online |
| 6 | +title: Add-SPOFontPackage |
| 7 | +schema: 2.0.0 |
| 8 | +author: JQ1u |
| 9 | +ms.author: luchaoqiu |
| 10 | +ms.reviewer: |
| 11 | +--- |
| 12 | + |
| 13 | +# Add-SPOFontPackage |
| 14 | + |
| 15 | +## SYNOPSIS |
| 16 | + |
| 17 | +Creates a new custom font package with fonts in the brand fonts library. |
| 18 | + |
| 19 | +## SYNTAX |
| 20 | + |
| 21 | +``` |
| 22 | +Add-SPOFontPackage -Title <String> -PackageJson <String> [-IsHidden <Boolean>] [<CommonParameters>] |
| 23 | +``` |
| 24 | + |
| 25 | +## DESCRIPTION |
| 26 | + |
| 27 | +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](/sharepoint/brand-fonts). |
| 28 | + |
| 29 | +## EXAMPLES |
| 30 | + |
| 31 | +### EXAMPLE 1 |
| 32 | + |
| 33 | +```powershell |
| 34 | +$packageJson = @' |
| 35 | +{ |
| 36 | + "fontFaces": [ |
| 37 | + { |
| 38 | + "fontFamily": "Tahoma", |
| 39 | + "path": "Tahoma.ttf", |
| 40 | + "fontType": "contentFont" |
| 41 | + } |
| 42 | + ], |
| 43 | + "fontSlots": { |
| 44 | + "title": { |
| 45 | + "fontFamily": "Tahoma", |
| 46 | + "fontFace": "Regular", |
| 47 | + "fontVariationSettings": { |
| 48 | + "wght": 100, |
| 49 | + "wdth": 100 |
| 50 | + } |
| 51 | + }, |
| 52 | + "heading": { |
| 53 | + "fontFamily": "Tahoma", |
| 54 | + "fontFace": "Regular", |
| 55 | + "fontVariationSettings": { |
| 56 | + "wght": 100, |
| 57 | + "wdth": 100 |
| 58 | + } |
| 59 | + }, |
| 60 | + "body": { |
| 61 | + "fontFamily": "Tahoma", |
| 62 | + "fontFace": "Regular", |
| 63 | + "fontVariationSettings": { |
| 64 | + "wght": 100, |
| 65 | + "wdth": 100 |
| 66 | + } |
| 67 | + }, |
| 68 | + "label": { |
| 69 | + "fontFamily": "Tahoma", |
| 70 | + "fontFace": "Regular", |
| 71 | + "fontVariationSettings": { |
| 72 | + "wght": 100, |
| 73 | + "wdth": 100 |
| 74 | + } |
| 75 | + } |
| 76 | + } |
| 77 | +} |
| 78 | +'@ |
| 79 | +
|
| 80 | +Add-SPOFontPackage -Title "Tahoma" -PackageJson $packageJson |
| 81 | +``` |
| 82 | + |
| 83 | +This example creates a new font package named "Tahoma" with specified JSON configuration. |
| 84 | + |
| 85 | +### EXAMPLE 2 |
| 86 | + |
| 87 | +```powershell |
| 88 | +# With $packageJson from EXAMPLE 1 |
| 89 | +Add-SPOFontPackage -Title "Contoso Font Package" -PackageJson $packageJson -IsHidden $true |
| 90 | +``` |
| 91 | + |
| 92 | +This example creates a hidden font package with specified JSON configuration. |
| 93 | + |
| 94 | +## PARAMETERS |
| 95 | + |
| 96 | +### -Title |
| 97 | + |
| 98 | +> Applicable: SharePoint Online |
| 99 | +
|
| 100 | +Specifies the display name of the new font package. |
| 101 | + |
| 102 | +```yaml |
| 103 | +Type: System.String |
| 104 | +Parameter Sets: (All) |
| 105 | +Aliases: |
| 106 | + |
| 107 | +Required: True |
| 108 | +Position: Named |
| 109 | +Default value: None |
| 110 | +Accept pipeline input: False |
| 111 | +Accept wildcard characters: False |
| 112 | +``` |
| 113 | +
|
| 114 | +### -PackageJson |
| 115 | +
|
| 116 | +> Applicable: SharePoint Online |
| 117 | +
|
| 118 | +Specifies the JSON configuration for the font package. |
| 119 | +
|
| 120 | +```yaml |
| 121 | +Type: System.String |
| 122 | +Parameter Sets: (All) |
| 123 | +Aliases: |
| 124 | + |
| 125 | +Required: True |
| 126 | +Position: Named |
| 127 | +Default value: None |
| 128 | +Accept pipeline input: False |
| 129 | +Accept wildcard characters: False |
| 130 | +``` |
| 131 | +
|
| 132 | +### -IsHidden |
| 133 | +
|
| 134 | +> Applicable: SharePoint Online |
| 135 | +
|
| 136 | +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. |
| 137 | + |
| 138 | +```yaml |
| 139 | +Type: System.Boolean |
| 140 | +Parameter Sets: (All) |
| 141 | +Aliases: |
| 142 | +
|
| 143 | +Required: False |
| 144 | +Position: Named |
| 145 | +Default value: False |
| 146 | +Accept pipeline input: True (ByValue) |
| 147 | +Accept wildcard characters: False |
| 148 | +``` |
| 149 | + |
| 150 | +### CommonParameters |
| 151 | + |
| 152 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). |
| 153 | + |
| 154 | +## OUTPUTS |
| 155 | + |
| 156 | +### System.Object |
| 157 | + |
| 158 | +## NOTES |
| 159 | + |
| 160 | +## RELATED LINKS |
| 161 | + |
| 162 | +[Get-SPOFontPackage](Get-SPOFontPackage.md) |
| 163 | + |
| 164 | +[Set-SPOFontPackage](Set-SPOFontPackage.md) |
| 165 | + |
| 166 | +[Remove-SPOFontPackage](Remove-SPOFontPackage.md) |
0 commit comments