Click or drag to resize

GdiFontManager Class

Manages Font instances and corresponds them with the Altaxo fonts (FontX).
Inheritance Hierarchy
SystemObject
  Altaxo.Graph.GdiGdiFontManager

Namespace: Altaxo.Graph.Gdi
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public class GdiFontManager

The GdiFontManager type exposes the following members.

Constructors
 NameDescription
Protected methodGdiFontManager Initializes a new instance of the GdiFontManager class.
Top
Properties
 NameDescription
Protected propertyStatic member_instance 
Public propertyStatic memberGenericSansSerifFontFamilyName Gets the GDI generic sans serif font family name
Top
Methods
 NameDescription
Protected methodAddSystemGdiFontFamilies Builds the GDI font families dictionary.
Protected methodStatic memberConvertFontXStyleToFontStylePresence Converts a FontXStyle instance to a FontStylePresence instance. The styles 'Underline' and 'Strikeout' will not be considered for the conversion.
Protected methodDisposeReleases all resources used by the GdiFontManager
Protected methodEhAnnounceConstructionOfFontX Is called upon every construction of a FontX instance.
Protected methodEhAnnounceDestructionOfFontX Is called upon every destruction of a FontX instance.
Protected methodEhInstalledFontsChanged Called when the installed fonts changed during execution of this program.
Public methodStatic memberEnumerateAvailableGdiFontFamilyNames Enumerates the available GDI font family names.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Protected methodStatic memberFontFamilyArrayToFontStylePresence 
Protected methodStatic memberFontStyleToIndex Gives the index of the font style. Not taken into account are Underline and Italic. These two flags are ignored.
Protected methodStatic memberGetFontStylePresence(FontFamily) Finds out which font styles are available for the given Gdi font family.
Protected methodStatic memberGetFontStylePresence(FontFamily, FontFamily) Finds out which font styles are available for the given Gdi font family.
Public methodStatic memberGetFontX Constructs a font from a font family name, the size and font style.
Public methodStatic memberGetFontXGenericSansSerif Gets a FontX instance of a generic sans serif font with the provided size and style.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodStatic memberGetHeightGets the height of the font in points (1/72 inch).
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodStatic memberGetValidFontFamilyName Gets the family name from a FontX instance. If this font family name does not exist, a generic sans serif font family name is returned instead.
Protected methodInternalBuildDictionaries Build the font dictionaries.
Protected methodInternalGetAvailableFontFamilies Gets all available font families and stores them in the provided dictionary.
Protected methodInternalGetFontFamilyNameGenericSansSerif 
Protected methodInternalGetGdiFontFromFamilyAndSizeAndStyle Gets a GDI font from the the family name, size and style.
Protected methodInternalGetGdiFontFromInvariantString Gets a GDI font from the invariant string.
Protected methodInternalIsFontFamilyAndStyleAvailable Determines whether a font with the given font family name and font style is available.
Protected methodInternalIsFontFamilyAvailable Determines whether a font family with the provided name is available.
Protected methodInternalToGdi Retrieves the Gdi+ font instance that the provided FontX argument is describing.
Public methodStatic memberIsFontFamilyAndStyleAvailable Determines whether a font with the given font family name and font style is available.
Public methodStatic memberIsFontFamilyAvailable Determines whether a font family with the provided name is available.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodSplitInvariantDescriptionString Splits an invariant description string into its parts
Public methodStatic memberToGdi Retrieves the Gdi+ font instance that the provided FontX argument is describing.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Fields
 NameDescription
Protected field_dictDescriptionStringToGdiFontCorresponds the font's invariant description string with the Gdi+ font instance. Key is the invariant description string, value is the Gdi font instance with the specific style and size.
Protected field_dictWin32FamilyNameToGdiFontFamilyAndPresence Dictionary of the Gdi font families. Key is the Win32FamilyName, value is an array[4] of FontFamily with represent the styles regular, bold, italic, and bold-Italic. For system fonts, the 4 font family instances will be identical, but due to a bug in Windows 10, to create a private font family we need to load each font file in a separate PrivateFontCollection, thus creating a separate FontFamily for each style.
Protected field_gdiFontReferenceCounterCorresponds the font's invariant description string with a reference counter. It counts the number of FontX instances with this description string. When the reference counter falls down to zero, the Gdi+ font instance can be released.
Protected fieldStatic member_instanceCachedThe instance used by the static methods of this class. Is not neccessarily of type GdiFontManager, but could also be a derived type.
Protected fieldStatic memberIdxBoldThe index into the FontFamily array for the bold style.
Protected fieldStatic memberIdxBoldItalicThe index into the FontFamily array for the bold-italic style.
Protected fieldStatic memberIdxItalicThe index into the FontFamily array for the italic style.
Protected fieldStatic memberIdxRegularThe index into the FontFamily array for the regular style.
Top
See Also