Back to Devexpress

ASPxRichEditFontMappingSettings.DefaultFontName Property

aspnet-devexpress-dot-web-dot-aspxrichedit-dot-aspxricheditfontmappingsettings-67d7a94b.md

latest3.5 KB
Original Source

ASPxRichEditFontMappingSettings.DefaultFontName Property

Specifies a font to which font families are mapped by default.

Namespace : DevExpress.Web.ASPxRichEdit

Assembly : DevExpress.Web.ASPxRichEdit.v25.2.dll

NuGet Package : DevExpress.Web.Office

Declaration

csharp
[DefaultValue("")]
public string DefaultFontName { get; set; }
vb
<DefaultValue("")>
Public Property DefaultFontName As String

Property Value

TypeDefaultDescription
StringString.Empty

The font name.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to DefaultFontName
ASPxRichEditFontSettings

.MappingSettings .DefaultFontName

|

Remarks

The DefaultFontName property specifies a name of a font to which font families are mapped by default (when there is no an appropriate rule in the Rules collection).

Note

The DefaultFontName property value should match the Name property value of a font listed in the FontCollection collection.

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

aspx
<dx:ASPxRichEdit ID="richEdit" runat="server" WorkDirectory="~\App_Data\WorkDirectory">
  <Settings>
    <Fonts DefaultFolder="fontsFolder/">
      <FontCollection>
        <dx:ASPxRichEditFont FontFamily="Calibri" Name="Calibri"
          RegularFontUri="CalibriFont/calibri.ttf"
          BoldFontUri="CalibriFont/calibrib.ttf"
          ItalicFontUri="CalibriFont/calibrii.ttf"
          BoldItalicFontUri="CalibriFont/calibriz.ttf" />
        <dx:ASPxRichEditFont FontFamily="Comic" Name="Comic" />
        <dx:ASPxRichEditFont FontFamily="Lemonada" Name="Lemonada" UseGoogleFonts="true" />
        <dx:ASPxRichEditFont FontFamily="Roboto Mono" Name="Roboto Mono" UseGoogleFonts="true" />
      </FontCollection>
      <MappingSettings DefaultFontName="Calibri">
        <Rules>
          <dx:ASPxRichEditFontMappingRule SourceFontFamily="Arial" DestinationFontName="Comic" />
          <dx:ASPxRichEditFontMappingRule SourceFontFamily="Times" DestinationFontName="Roboto Mono" />
        </Rules>
      </MappingSettings>
    </Fonts>
  </Settings>
</dx:ASPxRichEdit>

See Also

ASPxRichEditFontMappingSettings Class

ASPxRichEditFontMappingSettings Members

DevExpress.Web.ASPxRichEdit Namespace