Class Typeface
  
  
  
  
  
  
  Assembly: Ritchie.Toolbox.dll
  Syntax
  
    public class Typeface : Font, IDisposable
   
  Properties
  
  ReferenceFontSize
  Gets a value indicating the reference font size, in pixels, of this font.
All global metrics, such as ascenders/descenders and underline positions,
are calculated with this font size.
Declaration
  
    public override float ReferenceFontSize { get; }
   
  Property Value
  
  Overrides
  
  
  ReferencePixelsPerInch
  
  
  Declaration
  
    public static int ReferencePixelsPerInch { get; }
   
  Property Value
  
  
  UnderlinePosition
  Gets the position of underlines, relative to the top of a line of text.
Declaration
  
    public override float UnderlinePosition { get; }
   
  Property Value
  
  Overrides
  
  Methods
  
  Dispose(bool)
  
  
  Declaration
  
    protected override void Dispose(bool disposing)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | bool | disposing |  | 
    
  
  Overrides
  
  
  Draw(GeometryHelper, Vector2, Color, string, float, int)
  
  
  Declaration
  
    public override void Draw(GeometryHelper geometryHelper, Vector2 position, Color color, string text, float characterSpacing, int fontSize)
   
  Parameters
  
  Overrides
  
  
  Draw(GeometryHelper, Vector2, Color, Rune, int)
  
  
  Declaration
  
    public override void Draw(GeometryHelper geometryHelper, Vector2 position, Color color, Rune rune, int fontSize)
   
  Parameters
  
  Overrides
  
  
  FromStream(GraphicsDevice, Stream, int, FontSizeMetric, bool)
  
  
  Declaration
  
    public static Typeface FromStream(GraphicsDevice graphicsDevice, Stream stream, int referenceFontSize, FontSizeMetric sizeMetric, bool antiAliased = true)
   
  Parameters
  
  Returns
  
  
  GetLineHeight(int?, bool)
  
  
  Declaration
  
    public override int GetLineHeight(int? fontSizePixels, bool useReferenceScale = true)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | int? | fontSizePixels |  | 
      
        | bool | useReferenceScale |  | 
    
  
  Returns
  
  Overrides
  
  
  Measure(string, float, int, bool)
  
  
  Declaration
  
    public override Point Measure(string text, float characterSpacing, int fontSize, bool useReferenceScale = true)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | string | text |  | 
      
        | float | characterSpacing |  | 
      
        | int | fontSize |  | 
      
        | bool | useReferenceScale |  | 
    
  
  Returns
  
  Overrides
  
  
  SetPixelsPerInch(int)
  
  
  Declaration
  
    public static void SetPixelsPerInch(int newPixelsPerInch)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | int | newPixelsPerInch |  | 
    
  
  
  SetReferencePixelsPerInch(int)
  
  
  Declaration
  
    public static void SetReferencePixelsPerInch(int newPixelsPerInch)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | int | newPixelsPerInch |  | 
    
  
  Implements