Back to Devexpress

FontsSettingsBuilder.DefaultFolder(String) Method

aspnetcore-devexpress-dot-aspnetcore-dot-richedit-dot-fontssettingsbuilder-dot-defaultfolder-x28-system-dot-string-x29.md

latest2.4 KB
Original Source

FontsSettingsBuilder.DefaultFolder(String) Method

Specifies a folder that contains font source files.

Namespace : DevExpress.AspNetCore.RichEdit

Assembly : DevExpress.AspNetCore.RichEdit.v25.2.dll

NuGet Package : DevExpress.AspNetCore.RichEdit

Declaration

csharp
public FontsSettingsBuilder DefaultFolder(
    string DefaultFolder
)

Parameters

NameTypeDescription
DefaultFolderString

The folder URL.

|

Returns

TypeDescription
FontsSettingsBuilder

An object that can be used to further configure the RichEdit font settings.

|

Remarks

When you call the AddFont(string name, string fontFamily) method to add a font to the RichEdit control, you should provide the font’s source files for four styles: regular, bold, italic, and bold italic. Add font source files to the folder specified by the DefaultFolder method. Name a file based on the rules listed below. The control locates files based on a font’s fontFamily property value.

File NameDescriptionExample
fontFamily + .ttf/.woffThe font in regular stylecomic.ttf
fontFamily + b + .ttf/.woffThe font in bold stylecomicb.ttf
fontFamily + i + .ttf/.woffThe font in italic stylecomici.ttf
fontFamily + z + .ttf/.woffThe font in bold italic stylecomicz.ttf
cshtml
@(Html.DevExpress().RichEdit("richEdit")
    .Fonts(f => {
        f.DefaultFolder("fontsFolder");
        f.AddFont("Comic", "Comic");

See the Font Management to learn more about fonts in the RichEdit control.

See Also

FontsSettingsBuilder Class

FontsSettingsBuilder Members

DevExpress.AspNetCore.RichEdit Namespace