FontMappingsSettingsBuilder.AddRule(String, String) Method
Adds a new font mapping rule to the RichEdit control.
Namespace: DevExpress.AspNetCore.RichEdit
Assembly: DevExpress.AspNetCore.RichEdit.v24.2.dll
NuGet Package: DevExpress.AspNetCore.RichEdit
#Declaration
public FontMappingsSettingsBuilder AddRule(
string sourceFontFamily,
string destinationFontName
)
#Parameters
Name | Type | Description |
---|---|---|
source |
String | A name of a font family that is mapped. |
destination |
String | A font to which a source font family is mapped. |
#Returns
Type | Description |
---|---|
Font |
An object that can be used to further configure the Rich |
#Remarks
@(Html.DevExpress().RichEdit("richEdit")
.Fonts(f => {
f.AddFont("Calibri", "Calibri", "CalibriFont/calibri.ttf", "CalibriFont/calibrib.ttf", "CalibriFont/calibrii.ttf", "CalibriFont/calibriz.ttf");
f.AddFont("Roboto Mono", "Roboto Mono", true);
f.Mapping(m => {
m.DefaultFontName("Calibri");
m.AddRule("Times", "Roboto Mono");
});
})
)
For more information, see the Font Management topic.