Search Results for

    Show / Hide Table of Contents

    Class FontSource

    Identifies a font file that Mapsui should load and use when rendering text. The font is located via a URI using one of the supported schemes: embedded://, file://, http://, or https://. Assign to FontSource to override the system font with a custom typeface.

    Inheritance
    object
    FontSource
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Mapsui.Styles
    Assembly: Mapsui.dll
    Syntax
    public class FontSource

    Properties

    | Edit this page View Source

    Source

    The URI of the font file. Must use one of the supported schemes: embedded://, file://, http://, or https://. Assigning an unsupported scheme throws ArgumentException immediately.

    Declaration
    public required string Source { get; init; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    SourceToSourceId

    Registry that maps each unique font source URI to a stable GUID-based identifier. The identifier is used as the cache key in FontSourceCache.

    Declaration
    public static ConcurrentDictionary<string, string> SourceToSourceId { get; }
    Property Value
    Type Description
    ConcurrentDictionary<string, string>

    Methods

    | Edit this page View Source

    Equals(FontSource)

    Declaration
    protected bool Equals(FontSource other)
    Parameters
    Type Name Description
    FontSource other
    Returns
    Type Description
    bool
    | Edit this page View Source

    Equals(object?)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    object.Equals(object)
    | Edit this page View Source

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    object.GetHashCode()
    | Edit this page View Source

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()

    Operators

    | Edit this page View Source

    implicit operator FontSource(string)

    Allows a string to be used directly where a FontSource is expected.

    Declaration
    public static implicit operator FontSource(string source)
    Parameters
    Type Name Description
    string source
    Returns
    Type Description
    FontSource

    Extension Methods

    DisposableExtension.DisposeIfDisposable(object?)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX