Skip to main content

Class FontService

Namespace: Aurigma.DesignAtoms.Services​
Assembly: Aurigma.DesignAtoms.dll​
Syntax
public class FontService : IFontService, IDisposable

Inheritance: System.Object -> FontService

Implements​

Inherited Members​

  • System.Object.ToString
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object,System.Object)
  • System.Object.ReferenceEquals(System.Object,System.Object)
  • System.Object.GetHashCode
  • System.Object.GetType
  • System.Object.MemberwiseClone

Constructors​

FontService​

public FontService(IConfiguration configuration, IFontStorage fontStorage, IFontInfoProvider fontInfoProvider, bool initialize = true)

Properties​

LocalFonts​

public virtual IReadOnlyDictionary<string, IList<FontService.FontData>> LocalFonts { get; }

AllFontsByFamily​

public IReadOnlyDictionary<string, IList<FontService.FontData>> AllFontsByFamily { get; }

AllFontsByPsName​

public IReadOnlyDictionary<string, FontService.FontData> AllFontsByPsName { get; }

FontRemaps​

public IReadOnlyDictionary<string, string> FontRemaps { get; }

FontSizeWarningThreshold​

public long FontSizeWarningThreshold { get; }

DefaultPostscriptName​

public string DefaultPostscriptName { get; }

FontRegistry​

public FontRegistry FontRegistry { get; }

Methods​

Dispose​

public void Dispose()

GetCompressedFontStreamAsync​

public Task<Stream> GetCompressedFontStreamAsync(string postscriptName)
Parameters​
TypeNameDescription
System.StringpostscriptName
Returns​

System.Threading.Tasks.Task<System.IO.Stream>

GetCompressedFontStream​

[Obsolete("This method is obsolete, use GetCompressedFontStream instead.")]
public Task<Stream> GetCompressedFontStream(string postscriptName)
Parameters​
TypeNameDescription
System.StringpostscriptName
Returns​

System.Threading.Tasks.Task<System.IO.Stream>

GetFontRegistry​

public FontRegistry GetFontRegistry()
Returns​

Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry

CreateFont​

public Font CreateFont(FontRegistry fontRegistry, string postScriptName, float size, float dpiX, float dpiY)
Parameters​
TypeNameDescription
Aurigma.GraphicsMill.AdvancedDrawing.FontRegistryfontRegistry
System.StringpostScriptName
System.Singlesize
System.SingledpiX
System.SingledpiY
Returns​

Aurigma.GraphicsMill.AdvancedDrawing.Font

InitializeAsync​

public Task InitializeAsync()
Returns​

System.Threading.Tasks.Task

WaitUntilReadyAsync​

public Task WaitUntilReadyAsync()
Returns​

System.Threading.Tasks.Task

UpdateLocalFonts​

[Obsolete]
public void UpdateLocalFonts()

GetBytes​

public IEnumerable<byte> GetBytes()
Returns​

System.Collections.Generic.IEnumerable<System.Byte>

RecognizeFontStyle​

public FontService.FontStyle RecognizeFontStyle(string style)
Parameters​
TypeNameDescription
System.Stringstyle
Returns​

Aurigma.DesignAtoms.Services.FontService.FontStyle

GetCssPsName​

public string GetCssPsName(FontService.FontData requestedFont)
Parameters​
TypeNameDescription
Aurigma.DesignAtoms.Services.FontService.FontDatarequestedFont
Returns​

System.String

GetCssFamilyName​

public string GetCssFamilyName(FontService.FontData requestedFont)
Parameters​
TypeNameDescription
Aurigma.DesignAtoms.Services.FontService.FontDatarequestedFont
Returns​

System.String

FindSuitableFont​

public FontSettings FindSuitableFont(string fontFamily, bool requestedBold = false, bool requestedItalic = false, string requestedStyle = null)
Parameters​
TypeNameDescription
System.StringfontFamily
System.BooleanrequestedBold
System.BooleanrequestedItalic
System.StringrequestedStyle
Returns​

Aurigma.DesignAtoms.Model.Items.FontSettings

FilterMissedFontsByPsNames​

public IEnumerable<string> FilterMissedFontsByPsNames(IEnumerable<string> requestedFontsPsNames)
Parameters​
TypeNameDescription
System.Collections.Generic.IEnumerable<System.String>requestedFontsPsNames
Returns​

System.Collections.Generic.IEnumerable<System.String>

FilterMissedFontsByFontFamilyAndStyle>)​

public IEnumerable<string> FilterMissedFontsByFontFamilyAndStyle(IEnumerable<(string, string)> requestedFonts)
Parameters​
TypeNameDescription
System.Collections.Generic.IEnumerable<System.ValueTuple<System.String,System.String>>requestedFonts
Returns​

System.Collections.Generic.IEnumerable<System.String>

CreateProductAvailableFontsAsync​

public Task<Dictionary<string, IEnumerable<FontService.ExtendedFontData>>> CreateProductAvailableFontsAsync(IProductHandler productHandler, Product product, IList<string> requestedLocalFonts, string requestedDefaultFont)
Parameters​
TypeNameDescription
Aurigma.DesignAtoms.Model.IProductHandlerproductHandler
Aurigma.DesignAtoms.Model.Productproduct
System.Collections.Generic.IList<System.String>requestedLocalFonts
System.StringrequestedDefaultFont
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.IEnumerable<Aurigma.DesignAtoms.Services.FontService.ExtendedFontData>>>

CreateProductAvailableFonts1​

[Obsolete]
public Dictionary<string, IEnumerable<FontService.ExtendedFontData>> CreateProductAvailableFonts1(IProductHandler productHandler, Product product, IList<string> requestedLocalFonts, string requestedDefaultFont)
Parameters​
TypeNameDescription
Aurigma.DesignAtoms.Model.IProductHandlerproductHandler
Aurigma.DesignAtoms.Model.Productproduct
System.Collections.Generic.IList<System.String>requestedLocalFonts
System.StringrequestedDefaultFont
Returns​

System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.IEnumerable<Aurigma.DesignAtoms.Services.FontService.ExtendedFontData>>

GetFontStreamByPostscriptNameAsync​

public Task<Stream> GetFontStreamByPostscriptNameAsync(string psName)
Parameters​
TypeNameDescription
System.StringpsName
Returns​

System.Threading.Tasks.Task<System.IO.Stream>

GetFontStreamByPostscriptName​

[Obsolete("This method is obsolete, use GetFontStreamByPostscriptNameAsync instead.")]
public Task<Stream> GetFontStreamByPostscriptName(string psName)
Parameters​
TypeNameDescription
System.StringpsName
Returns​

System.Threading.Tasks.Task<System.IO.Stream>

GetFontPath​

public string GetFontPath(string fontKey)
Parameters​
TypeNameDescription
System.StringfontKey
Returns​

System.String

GetFontStreamByPathAsync​

public Task<Stream> GetFontStreamByPathAsync(string fontPath)
Parameters​
TypeNameDescription
System.StringfontPath
Returns​

System.Threading.Tasks.Task<System.IO.Stream>

GetFontStreamByPath​

[Obsolete("This method is obsolete, use GetFontStreamByPathAsync instead.")]
public Task<Stream> GetFontStreamByPath(string fontPath)
Parameters​
TypeNameDescription
System.StringfontPath
Returns​

System.Threading.Tasks.Task<System.IO.Stream>

FixFontPsName​

public string FixFontPsName(string psName)
Parameters​
TypeNameDescription
System.StringpsName
Returns​

System.String

GetFontKey​

public static string GetFontKey(string postScriptName, string fontFileFullName)
Parameters​
TypeNameDescription
System.StringpostScriptName
System.StringfontFileFullName
Returns​

System.String

GetFontMimeType​

public static string GetFontMimeType(string fileName)
Parameters​
TypeNameDescription
System.StringfileName
Returns​

System.String

Was this page helpful?