Class FontsSubsystem

Class FontsSubsystem

Nazwa przestrzeń: Aspose.Note.Fonts Zgromadzenie: Aspose.Note.dll (25.4.0)

Klasa podstawowa wdrażanie Aspose.Note.Fonts.IFONTsInterfejs Subsystem.Zapewnia funkcjonalność domyślnych utworów i zastępów.Override Aspose.Note.Fonts.FoundsSubsystem.CzłowiekFunkcja ochrony członka w klasie pochodnej w celu wdrożenia logiki do odzyskania Obiekt System.Drawing.

public abstract class FontsSubsystem : IFontsSubsystem
{
    public abstract Font GetFontByName(string name);
    public abstract void AddFont(Font font);
    public abstract void RemoveFont(Font font);
}

Inheritance

object FontsSubsystem

Derived

DocumentFontsSubsystem

Implements

IFontsSubsystem

Dziedziczeni członkowie

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

FontsSubsystem(Stream, Słownik<string, string="">)

Inicjalizuje nową instancję klasy Aspose.Note.Fonts.

protected FontsSubsystem(
      Stream defaultFont,
      Dictionary<string, string> fontsSubstitutions = null)
   {
   }

Parameters

defaultFont Stream

Strumień zawierający default font.

fontsSubstitutions Dictionary • < string , string >

Zastąpienia fontów.

FontsSubsystem(string, Słownik<strin, string="">)

Inicjalizuje nową instancję klasy Aspose.Note.Fonts.

protected FontsSubsystem(string defaultFontFile, Dictionary<string, string> fontsSubstitutions = null)
   {
   }

Parameters

defaultFontFile string

Strumień zawierający default font.

fontsSubstitutions Dictionary • < string , string >

Zastąpienia fontów.

Źródła Podsystem()

Inicjalizuje nową instancję klasy Aspose.Note.Fonts.

protected FontsSubsystem()
   {
   }

Properties

DefaultFont

Dostęp lub ustaw standardowe czcionki.

public FontFamily DefaultFont
   {
      get;
      protected set;
   }

Wartość nieruchomości

FontFamily

Methods

DodFont (strum, strum)

Dodaj do tego font.

public void AddFont(Stream stream, string tempFolder)
   {
   }

Parameters

stream Stream

Strumień zawierający czcionkę.

tempFolder string

Płytki Temp Folder.

Podręcznik ( Stream )

Dodaj do tego font.

public void AddFont(Stream stream)
   {
   }

Parameters

stream Stream

Strumień zawierający czcionkę.

Podręcznik (string )

Dodaj do tego font.

public void AddFont(string file)
   {
   }

Parameters

file string

Droga do pliku zawierającego czcionkę.

DodFontSubstitution(string, stringa)

Dodaj wymianę czcionki.

public void AddFontSubstitution(string substituted, string substitution)
   {
   }

Parameters

substituted string

Zastąpiona nazwa czcionki.

substitution string

Zastąpienie nazwy czcionki.

FETCHFONTFAMILY (string)

Fetches font family jako kandydat na GetFontFamily.

protected abstract FontFamily FetchFontFamily(string fontName)
   {
   }

Parameters

fontName string

Imię z fontem.

Returns

FontFamily

System.Drawing.FontFamily jest dostępny.

FindFontFamilyInInternalCollection(string)

Spróbuj znaleźć rodzinę czcionek w wewnętrznej kolekcji GDI.

protected FontFamily FindFontFamilyInInternalCollection(string fontFamilyName)
   {
      foreach (FontFamily fontFamily in this._internalFontFamilies)
      {
         if (fontFamily.Name == fontFamilyName)
            return fontFamily;
      }
      return null;
   }

Parameters

fontFamilyName string

Nazwa rodziny font.

Returns

FontFamily

System.Drawing.FontFamily jest dostępny.

Znajduje się w String (String)

Znajduje się font rodzinny.

public virtual FontFamily GetFontFamily(string fontName)
   {
   }

Parameters

fontName string

Imię z fontem.

Returns

FontFamily

System.Drawing.FontFamily jest dostępny.

Artykuły na temat LoadFontsFromFolder(string)

Pobiera wszystkie czcionki TrueType z określonego folderu do wewnętrznej kolekcji.

public void LoadFontsFromFolder(string folder)
   {
      foreach (var file in Directory.GetFiles(folder, "*.ttf"))
      {
         using (var font = new Font(file))
         {
            AddFont(font);
         }
      }
   }

Parameters

folder string

folder zawierający czcionki.

Exceptions

NullReferenceException

Parametry „Folder” są zerowe lub puste.

DirectoryNotFoundException

Nie istnieje katalog wyznaczony folderem.

InvalidDataException

Plik z folderu nie zawiera fontów TrueType.

TłumaczenieFontName(string)

Spróbuj przetłumaczyć nazwę czcionki na jej zastąpienie za pośrednictwem wewnętrznej tabeli.

protected string TranslateFontName(string fontName)
   {
   }

Parameters

fontName string

Imię z fontem.

Returns

string

Nazwa czcionki zastępczej, jeżeli w inny sposób określono nazwę określoną w niej samą.</string,></string,></string,></string,>

 Polski