-
Notifications
You must be signed in to change notification settings - Fork 196
Add docs for font package cmdlets #987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
padmagit77
merged 3 commits into
MicrosoftDocs:main
from
JQ1u:MicrosoftDocs/update-set-font-package
Aug 14, 2025
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
166 changes: 166 additions & 0 deletions
166
...oint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Add-SPOFontPackage.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,166 @@ | ||
| --- | ||
| external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml | ||
| Module Name: Microsoft.Online.SharePoint.PowerShell | ||
| online version: https://learn.microsoft.com/powershell/module/sharepoint-online/add-spofontpackage | ||
| applicable: SharePoint Online | ||
| title: Add-SPOFontPackage | ||
| schema: 2.0.0 | ||
| author: JQ1u | ||
| ms.author: luchaoqiu | ||
| ms.reviewer: | ||
| --- | ||
|
|
||
| # Add-SPOFontPackage | ||
|
|
||
| ## SYNOPSIS | ||
|
|
||
| Creates a new custom font package with fonts in the brand fonts library. | ||
|
|
||
| ## SYNTAX | ||
|
|
||
| ``` | ||
| 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](/sharepoint/brand-fonts). | ||
|
|
||
| ## EXAMPLES | ||
|
|
||
| ### EXAMPLE 1 | ||
|
|
||
| ```powershell | ||
| $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 | ||
|
|
||
| ```powershell | ||
| # 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 | ||
|
|
||
| ### -Title | ||
|
|
||
| > Applicable: SharePoint Online | ||
|
|
||
| Specifies the display name of the new font package. | ||
|
|
||
| ```yaml | ||
| Type: System.String | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: True | ||
| Position: Named | ||
| Default value: None | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -PackageJson | ||
|
|
||
| > Applicable: SharePoint Online | ||
|
|
||
| Specifies the JSON configuration for the font package. | ||
|
|
||
| ```yaml | ||
| Type: System.String | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: True | ||
| Position: Named | ||
| Default value: None | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -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. | ||
|
|
||
| ```yaml | ||
| Type: System.Boolean | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: False | ||
| Accept pipeline input: True (ByValue) | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### CommonParameters | ||
|
|
||
| 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). | ||
|
|
||
| ## OUTPUTS | ||
|
|
||
| ### System.Object | ||
|
|
||
| ## NOTES | ||
|
|
||
| ## RELATED LINKS | ||
|
|
||
| [Get-SPOFontPackage](Get-SPOFontPackage.md) | ||
|
|
||
| [Set-SPOFontPackage](Set-SPOFontPackage.md) | ||
|
|
||
| [Remove-SPOFontPackage](Remove-SPOFontPackage.md) |
106 changes: 106 additions & 0 deletions
106
...oint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOFontPackage.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| --- | ||
| external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml | ||
| Module Name: Microsoft.Online.SharePoint.PowerShell | ||
| online version: https://learn.microsoft.com/powershell/module/sharepoint-online/get-spofontpackage | ||
| applicable: SharePoint Online | ||
| title: Get-SPOFontPackage | ||
| schema: 2.0.0 | ||
| author: JQ1u | ||
| ms.author: luchaoqiu | ||
| ms.reviewer: | ||
| --- | ||
|
|
||
| # Get-SPOFontPackage | ||
|
|
||
| ## SYNOPSIS | ||
|
|
||
| Returns one or all custom font packages in the tenant. | ||
|
|
||
| ## SYNTAX | ||
|
|
||
| ``` | ||
| Get-SPOFontPackage [[-Identity] <SPOFontPackagePipeBind>] [<CommonParameters>] | ||
| ``` | ||
|
|
||
| ## DESCRIPTION | ||
|
|
||
| This cmdlet retrieves one or more custom font packages in the tenant. Custom font packages include those created through the SharePoint Brand Center app or by using the `Add-SPOFontPackage` cmdlet. You can retrieve a specific font package by providing its identity, or retrieve all font packages if no identity is specified. | ||
|
|
||
| Font packages contain custom typography definitions that can be applied to SharePoint sites and Viva Connections for branding purposes. | ||
|
|
||
| ## EXAMPLES | ||
|
|
||
| ### EXAMPLE 1 | ||
|
|
||
| ```powershell | ||
| Get-SPOFontPackage | ||
| ``` | ||
|
|
||
| This example returns all font packages in the tenant. | ||
|
|
||
| ### EXAMPLE 2 | ||
|
|
||
| ```powershell | ||
| Get-SPOFontPackage -Identity 12345678-1234-1234-1234-123456789012 | ||
| ``` | ||
|
|
||
| This example returns the font package with the specified GUID. | ||
|
|
||
| ### EXAMPLE 3 | ||
|
|
||
| ```powershell | ||
| Get-SPOFontPackage | Where-Object {$_.IsHidden -eq $false} | ||
| ``` | ||
|
|
||
| This example returns all visible font packages (not hidden). | ||
|
|
||
| ### EXAMPLE 4 | ||
|
|
||
| ```powershell | ||
| $fontPackage = Get-SPOFontPackage -Identity 12345678-1234-1234-1234-123456789012 | ||
| $fontPackage.PackageJson | ||
| ``` | ||
|
|
||
| This example retrieves a specific font package and displays its JSON configuration. | ||
|
|
||
| ## PARAMETERS | ||
|
|
||
| ### -Identity | ||
|
|
||
| > Applicable: SharePoint Online | ||
|
|
||
| Specifies the identity of the font package to retrieve. This can be the ID (GUID) of the font package, or a font package object. If not specified, all font packages will be retrieved. | ||
|
|
||
| ```yaml | ||
| Type: Microsoft.Online.SharePoint.PowerShell.SPOFontPackagePipeBind | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: 0 | ||
| Default value: None | ||
| Accept pipeline input: True (ByValue) | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### CommonParameters | ||
|
|
||
| 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). | ||
|
|
||
| ## INPUTS | ||
|
|
||
| ### Microsoft.Online.SharePoint.PowerShell.SPOFontPackagePipeBind | ||
|
|
||
| ## OUTPUTS | ||
|
|
||
| ### System.Object | ||
|
|
||
| ## NOTES | ||
|
|
||
| ## RELATED LINKS | ||
|
|
||
| [Add-SPOFontPackage](Add-SPOFontPackage.md) | ||
|
|
||
| [Set-SPOFontPackage](Set-SPOFontPackage.md) | ||
|
|
||
| [Remove-SPOFontPackage](Remove-SPOFontPackage.md) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for future work: consider adding a param
-IsHiddento the cmdlet itself, this way the filtering happens server-side instead of client-side. Otherwise if a tenant has too many font packages this might not be as fast, since it returns everything to the client first.Get-SPOFontPackage -IsHidden $trueGet-SPOFontPackage -IsHidden $false