Search Results for

    Show / Hide Table of Contents

    Class FontInfo

    Inheritance
    System.Object
    FontInfo
    Namespace: DynamicTesseract
    Assembly: IronOcr.dll
    Syntax
    public class FontInfo : Object

    FontInfo is the record of a single font that Tesseract identified while recognizing a page. It names the font family and the fixed typographic traits that family carries, so interop code that needs to know what a piece of text was set in, rather than merely what it said, reads its properties. The nearest type it is paired with is FontAttributes, which describes how a font was used at one position; FontInfo is the shared family description those per-span attributes point back to.

    A FontInfo is produced by the engine during recognition, not constructed by hand, and turns up wherever the result surface exposes font detail. The everyday properties split into two groups. Identity is Name, the font family name as a String, and Id, an Int32 index the engine assigns to that font within a read. Style traits are the Boolean flags IsBold, IsItalic, IsSerif, IsFixedPitch, and IsFraktur, reporting weight, slant, whether the family is serif or sans, whether it is monospaced, and whether it is a blackletter Fraktur face. Reading those flags lets code rebuild approximate formatting, distinguish a heading font from body text, or flag unusual faces that may need a different language model.

    Because the values come straight from the recognizer, treat them as the engine's best estimate rather than ground truth, and read them after a successful recognition pass. For ordinary text extraction the high-level IronOCR result objects are the simpler surface; reach for FontInfo through the DynamicTesseract layer when font-level detail is what the task needs.

    Console.WriteLine($"{font.Name} bold={font.IsBold} serif={font.IsSerif}");

    The read results how-to walks through the result model, and the result confidence how-to explains how reliable a recognition pass is before trusting its font detail.

    Properties

    Id

    Declaration
    public int Id { get; }
    Property Value
    Type Description
    System.Int32

    IsBold

    Declaration
    public bool IsBold { get; }
    Property Value
    Type Description
    System.Boolean

    IsFixedPitch

    Declaration
    public bool IsFixedPitch { get; }
    Property Value
    Type Description
    System.Boolean

    IsFraktur

    Declaration
    public bool IsFraktur { get; }
    Property Value
    Type Description
    System.Boolean

    IsItalic

    Declaration
    public bool IsItalic { get; }
    Property Value
    Type Description
    System.Boolean

    IsSerif

    Declaration
    public bool IsSerif { get; }
    Property Value
    Type Description
    System.Boolean

    Name

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    System.String
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget