Back to Website
Show / Hide Table of Contents

Class FontService

Inheritance
System.Object
FontService
Implements
IFontService
System.IDisposable
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()
Namespace: Aurigma.DesignAtoms.Services
Assembly: Aurigma.DesignAtoms.dll
Syntax
public class FontService : IFontService, IDisposable

Constructors

FontService(IConfiguration, IFontStorage, IFontInfoProvider, Boolean)

Declaration
public FontService(IConfiguration configuration, IFontStorage fontStorage, IFontInfoProvider fontInfoProvider, bool initialize = true)
Parameters
Type Name Description
IConfiguration configuration
IFontStorage fontStorage
IFontInfoProvider fontInfoProvider
System.Boolean initialize

Properties

AllFontsByFamily

Declaration
public IReadOnlyDictionary<string, IList<FontService.FontData>> AllFontsByFamily { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyDictionary<System.String, System.Collections.Generic.IList<FontService.FontData>>

AllFontsByPsName

Declaration
public IReadOnlyDictionary<string, FontService.FontData> AllFontsByPsName { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyDictionary<System.String, FontService.FontData>

DefaultPostscriptName

Declaration
public string DefaultPostscriptName { get; }
Property Value
Type Description
System.String

FontRegistry

Declaration
public FontRegistry FontRegistry { get; }
Property Value
Type Description
Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry

FontRemaps

Declaration
public IReadOnlyDictionary<string, string> FontRemaps { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyDictionary<System.String, System.String>

FontSizeWarningThreshold

Declaration
public long FontSizeWarningThreshold { get; }
Property Value
Type Description
System.Int64

LocalFonts

Declaration
public virtual IReadOnlyDictionary<string, IList<FontService.FontData>> LocalFonts { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyDictionary<System.String, System.Collections.Generic.IList<FontService.FontData>>

Methods

CreateFont(FontRegistry, String, Single, Single, Single)

Declaration
public Font CreateFont(FontRegistry fontRegistry, string postScriptName, float size, float dpiX, float dpiY)
Parameters
Type Name Description
Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry fontRegistry
System.String postScriptName
System.Single size
System.Single dpiX
System.Single dpiY
Returns
Type Description
Aurigma.GraphicsMill.AdvancedDrawing.Font

CreateProductAvailableFonts1(IProductHandler, Product, IList<String>, String)

Declaration
[Obsolete]
public Dictionary<string, IEnumerable<FontService.ExtendedFontData>> CreateProductAvailableFonts1(IProductHandler productHandler, Product product, IList<string> requestedLocalFonts, string requestedDefaultFont)
Parameters
Type Name Description
IProductHandler productHandler
Product product
System.Collections.Generic.IList<System.String> requestedLocalFonts
System.String requestedDefaultFont
Returns
Type Description
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.IEnumerable<FontService.ExtendedFontData>>

CreateProductAvailableFontsAsync(IProductHandler, Product, IList<String>, String)

Declaration
public Task<Dictionary<string, IEnumerable<FontService.ExtendedFontData>>> CreateProductAvailableFontsAsync(IProductHandler productHandler, Product product, IList<string> requestedLocalFonts, string requestedDefaultFont)
Parameters
Type Name Description
IProductHandler productHandler
Product product
System.Collections.Generic.IList<System.String> requestedLocalFonts
System.String requestedDefaultFont
Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.IEnumerable<FontService.ExtendedFontData>>>

Dispose()

Declaration
public void Dispose()

FilterMissedFonts(IEnumerable<String>)

Declaration
public IEnumerable<string> FilterMissedFonts(IEnumerable<string> requestedFontsPsNames)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.String> requestedFontsPsNames
Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

FindSuitableFont(String, Boolean, Boolean, String)

Declaration
public FontSettings FindSuitableFont(string fontFamily, bool requestedBold = false, bool requestedItalic = false, string requestedStyle = null)
Parameters
Type Name Description
System.String fontFamily
System.Boolean requestedBold
System.Boolean requestedItalic
System.String requestedStyle
Returns
Type Description
FontSettings

FixFontPsName(String)

Declaration
public string FixFontPsName(string psName)
Parameters
Type Name Description
System.String psName
Returns
Type Description
System.String

GetBytes()

Declaration
public IEnumerable<byte> GetBytes()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Byte>

GetCompressedFontStream(String)

Declaration
[Obsolete("This method is obsolete, use GetCompressedFontStream instead.")]
public Task<Stream> GetCompressedFontStream(string postscriptName)
Parameters
Type Name Description
System.String postscriptName
Returns
Type Description
System.Threading.Tasks.Task<System.IO.Stream>

GetCompressedFontStreamAsync(String)

Declaration
public Task<Stream> GetCompressedFontStreamAsync(string postscriptName)
Parameters
Type Name Description
System.String postscriptName
Returns
Type Description
System.Threading.Tasks.Task<System.IO.Stream>

GetCssFamilyName(FontService.FontData)

Declaration
public string GetCssFamilyName(FontService.FontData requestedFont)
Parameters
Type Name Description
FontService.FontData requestedFont
Returns
Type Description
System.String

GetCssPsName(FontService.FontData)

Declaration
public string GetCssPsName(FontService.FontData requestedFont)
Parameters
Type Name Description
FontService.FontData requestedFont
Returns
Type Description
System.String

GetFontKey(String, String)

Declaration
public static string GetFontKey(string postScriptName, string fontFileFullName)
Parameters
Type Name Description
System.String postScriptName
System.String fontFileFullName
Returns
Type Description
System.String

GetFontMimeType(String)

Declaration
public static string GetFontMimeType(string fileName)
Parameters
Type Name Description
System.String fileName
Returns
Type Description
System.String

GetFontPath(String)

Declaration
public string GetFontPath(string fontKey)
Parameters
Type Name Description
System.String fontKey
Returns
Type Description
System.String

GetFontRegistry()

Declaration
public FontRegistry GetFontRegistry()
Returns
Type Description
Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry

GetFontStreamByPath(String)

Declaration
[Obsolete("This method is obsolete, use GetFontStreamByPathAsync instead.")]
public Task<Stream> GetFontStreamByPath(string fontPath)
Parameters
Type Name Description
System.String fontPath
Returns
Type Description
System.Threading.Tasks.Task<System.IO.Stream>

GetFontStreamByPathAsync(String)

Declaration
public Task<Stream> GetFontStreamByPathAsync(string fontPath)
Parameters
Type Name Description
System.String fontPath
Returns
Type Description
System.Threading.Tasks.Task<System.IO.Stream>

GetFontStreamByPostscriptName(String)

Declaration
[Obsolete("This method is obsolete, use GetFontStreamByPostscriptNameAsync instead.")]
public Task<Stream> GetFontStreamByPostscriptName(string psName)
Parameters
Type Name Description
System.String psName
Returns
Type Description
System.Threading.Tasks.Task<System.IO.Stream>

GetFontStreamByPostscriptNameAsync(String)

Declaration
public Task<Stream> GetFontStreamByPostscriptNameAsync(string psName)
Parameters
Type Name Description
System.String psName
Returns
Type Description
System.Threading.Tasks.Task<System.IO.Stream>

InitializeAsync()

Declaration
public Task InitializeAsync()
Returns
Type Description
System.Threading.Tasks.Task

RecognizeFontStyle(String)

Declaration
public FontService.FontStyle RecognizeFontStyle(string style)
Parameters
Type Name Description
System.String style
Returns
Type Description
FontService.FontStyle

UpdateLocalFonts()

Declaration
[Obsolete]
public void UpdateLocalFonts()

WaitUntilReadyAsync()

Declaration
public Task WaitUntilReadyAsync()
Returns
Type Description
System.Threading.Tasks.Task

Implements

IFontService
System.IDisposable
Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2025 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback