Browse our Products
Latest release
This article contains a summary of recent changes, enhancements and bug fixes in Aspose.OCR for .NET 26.7 (July 2026) release.
GPU version: 26.3.0
What was changed
| Key | Summary | Category |
|---|---|---|
| #OCRNET‑1253 | Added font detection support for recognized text lines, including font family, style, size, and confidence values. | New feature |
Public API changes and backwards compatibility
This section lists all public API changes introduced in Aspose.OCR for .NET 26.7 that may affect the code of existing applications.
Added public APIs:
The following public APIs have been introduced in this release:
Aspose.OCR.RecognitionSettings.DetectFonts - a new property
Enables font detection for each recognized text line. When enabled, font family, style, and estimated size are returned in RecognitionResult.RecognitionLinesResult.
Aspose.OCR.FontLineResult - a new type
Contains detected font information for a recognized text line.
New Properties
| Property | Description |
|---|---|
LineIndex | Zero-based line index in the processed font batch. |
SizePx | Detected line height in pixels. |
SizePtEstimate | Estimated font size in points. |
Style | Detected font style. |
StyleConfidence | Confidence score for the detected style. |
Font | Detected font family name. |
FontConfidence | Confidence score for the detected font family. |
Aspose.OCR.RecognitionResult.LinesResult.Font - a new property
Returns FontLineResult for the recognized text line when font detection is enabled.
Updated public APIs:
No changes.
Removed public APIs:
No changes.
Examples
The code sample below illustrates the changes introduced in this release:
Detect fonts in recognized text lines
using Aspose.OCR;
using System;
using System.Linq;
AsposeOcr recognitionEngine = new AsposeOcr();
OcrInput input = new OcrInput(InputType.SingleImage);
input.Add("source.png");
RecognitionSettings settings = new RecognitionSettings
{
DetectFonts = true,
ThreadsCount = 1
};
RecognitionResult result = recognitionEngine.Recognize(input, settings)[0];
foreach (RecognitionResult.LinesResult line in result.RecognitionLinesResult
.Where(line => !string.IsNullOrWhiteSpace(line.TextInLine)))
{
FontLineResult font = line.Font;
Console.WriteLine(line.TextInLine);
Console.WriteLine($"Font: {font.Font} ({font.FontConfidence:P0})");
Console.WriteLine($"Style: {font.Style} ({font.StyleConfidence:P0})");
Console.WriteLine($"Size: {font.SizePx}px / {font.SizePtEstimate}pt");
}