Windows Update breaks WPF TrueType font subsetting (Calibri.ttf format specification error) KB5120708

Reported
ISIMobile 36 Reputation points
2026-08-13T13:40:20.81+00:00

When printing in .NET Framework 4.8 application WPF, it seems to have broken the XPS printing.

See stack trace below. If I uninstall the KB5120708 update, it works again. It has broken our printing functionality on our business application. Can any one else confirm the issue?


'file:///C:/WINDOWS/FONTS/CALIBRI.TTF' file does not conform to the expected file format specification.
Developer technologies | Windows Presentation Foundation

3 answers

Sort by: Most helpful
  1. Tony Thach (WICLOUD CORPORATION) 340 Reputation points Microsoft External Staff Moderator
    2026-08-14T11:01:27.2466667+00:00

    Hi @ISIMobile

    This issue has been isolated to the WPF TrueType font-subsetting path. After installing KB5120708, GlyphTypeface.ComputeSubset() may throw a System.IO.FileFormatException when processing certain Windows fonts, including Calibri.

    A minimal reproduction is:

    var glyphTypeface = new GlyphTypeface(
        new Uri(@"C:\Windows\Fonts\calibri.ttf"));
    
    glyphTypeface.ComputeSubset(new ushort[] { 0 });
    

    On an affected system, the second line throws an exception similar to:

    System.IO.FileFormatException:
    'file:///C:/WINDOWS/FONTS/CALIBRI.TTF'
    file does not conform to the expected file format specification.
    

    This confirms that the issue does not require Crystal Reports, Infragistics, PrintDialog, or a complete XPS printing workflow. These components expose the problem because WPF uses font subsetting when serializing or printing XPS content.

    The font itself is not necessarily corrupted. It can still be loaded, displayed, and read successfully. The failure occurs specifically during the ComputeSubset() operation in the following path:

    MS.Internal.TrueTypeSubsetter.ComputeSubset
    System.Windows.Media.GlyphTypeface.ComputeSubset
    System.Windows.Xps.Serialization.FEMCacheItem.SubSetFont
    

    Community testing indicates that the following font families may be affected: Calibri, Cambria, Constantia, Corbel.

    Fonts reported as working include:

    Arial, Segoe UI, Times New Roman, Verdana, Tahoma, Consolas, Candara, Calibri Light.

    Testing also indicates a regression between WPF component versions 4.8.9340.0 and 4.8.9344.0, with version 4.8.9344.0 delivered by KB5120708. The same machine, document, and font file work before installing the update and fail after installing it.

    Detailed community analysis suggests that the affected fonts contain a large legacy kern table whose stored subtable length cannot accurately represent its actual size. The updated WPF font-subsetting implementation appears to validate this structure more strictly and rejects the font. This analysis is consistent with the available reproduction results, but Microsoft engineering is still investigating, so it should not yet be considered the final official root cause.

    As you might know, the only available temporary workarounds are:

    • Use an unaffected font Replacing Calibri or another affected font with Arial, Segoe UI, Times New Roman, or another font that subsets successfully may restore printing while keeping the security update installed. This may not be practical for applications with many customized forms or customer-managed templates, and it may affect document layout or pagination.
    • Disable font subsetting Developers who directly control XPS serialization may be able to disable font subsetting:
    var packagingPolicy = new XpsPackagingPolicy(xpsDocument);
    var serializationManager =
        new XpsSerializationManager(packagingPolicy, false);
    
    serializationManager.SetFontSubsettingPolicy(
        FontSubsetterCommitPolicies.None);
    
    serializationManager.SaveAsXaml(document);
    

    This workaround should be tested carefully. Disabling subsetting may embed complete fonts, potentially multiple times, and can significantly increase XPS or PDF file size, memory usage, and processing time.

    • Remove KB5120708 Removing KB5120708 has been reported to restore functionality. However, KB5120708 is a security update, and uninstalling it may remove important security protections or conflict with organizational patching policies. Therefore, uninstalling the update is not recommended as a preferred or long-term solution.

    Microsoft is actively investigating this regression. The available workarounds are temporary mitigations and may not be practical at scale. We will update this thread when an official resolution or additional guidance becomes available.

    If this explanation and the diagnostic steps were helpful, I would appreciate it if you could follow the instructions here, so that others experiencing similar behavior can benefit from the answer as well.  

    0 comments No comments
  2. Miguel Monteiro 0 Reputation points
    2026-08-13T16:30:03+00:00

    I have the exact same problem, also with a .NET Framework 4.8 WPF application, when printing a report from Crystal Reports.

    The font that gives the exception is not CALIBRI.TTF, but CALIBRIB.TTF (it's the bold version).

    Tried updating Crystal Reports to the last version but didn't solved anything.

    Uninstalling the Windows update solved the issue.

    Here is part of the stack trace:

    Line number: 0
    Message: O ficheiro 'file:///C:/WINDOWS/FONTS/CALIBRIB.TTF' não está em conformidade com a especificação de formato de ficheiro esperada.
       em MS.Internal.TrueTypeSubsetter.ComputeSubset(Void* fontData, Int32 fileSize, Uri sourceUri, Int32 directoryOffset, UInt16[] glyphArray)
       em MS.Internal.FontFace.TrueTypeFontDriver.ComputeFontSubset(ICollection`1 glyphs)
       em System.Windows.Media.GlyphTypeface.ComputeSubset(ICollection`1 glyphs)
       em System.Windows.Xps.Serialization.FEMCacheItem.SubSetFont(ICollection`1 glyphs, Stream stream)
       em System.Windows.Xps.Serialization.FEMCacheItem.Commit()
       em System.Windows.Xps.Serialization.XpsFontSubsetter.CommitFontSubsetsSignal(FontSubsetterCommitPolicies signal)
       em System.Windows.Xps.Serialization.XpsFontSerializationService.SignalCommit(Type type)
       em System.Windows.Xps.Serialization.XpsOMSerializationManager.signalReleaseToFontService(Type writerType)
       em System.Windows.Xps.Serialization.XpsOMSerializationManager.ReleaseXpsOMWriterForFixedDocument()
       em System.Windows.Xps.Serialization.XpsOMDocumentPaginatorSerializer.EndPersistObjectData()
       em System.Windows.Xps.Serialization.XpsOMDocumentPaginatorSerializer.PersistObjectData(SerializableObjectContext serializableObjectContext)
       em System.Windows.Xps.Serialization.XpsOMDocumentPaginatorSerializer.SerializeObject(Object serializedObject)
       em System.Windows.Xps.Serialization.XpsOMSerializationManager.SaveAsXaml(Object serializedObject)
       em System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(Object serializedObject, Boolean isSync)
       em System.Windows.Xps.XpsDocumentWriter.Write(DocumentPaginator documentPaginator, PrintTicket printTicket)
       em System.Windows.Controls.PrintDialog.PrintDocument(DocumentPaginator documentPaginator, String description)
       em SAPBusinessObjects.WPF.Viewer.PrintControl.Print()
       em SAPBusinessObjects.WPF.Viewer.ReportAlbum.PrintReport()
    
    0 comments No comments
  3. Tony Thach (WICLOUD CORPORATION) 340 Reputation points Microsoft External Staff Moderator
    2026-08-14T09:42:40.27+00:00

    We are actively investigating this issue and will share updates as soon as they become available. Thank you for your patience and understanding.