Windows: fonts on shared folders can't be loaded by DirectWrite/WPF (Z: not registered with Mount Manager) #51
Description
Description
In a Windows guest, fonts stored on a VMPal shared folder (Z:) can't be loaded by DirectWrite, so WPF apps that ship their own font files can't use them when run from the share. Text falls back to a generic font, and any element that references the font file directly (e.g. WPF Glyphs) throws an unhandled FileNotFoundException and crashes the app. The same files copied to C:\ work fine.
The cause appears to be that the VirtIO-FS volume isn't registered with the Windows Mount Manager. GetFinalPathNameByHandle fails with ERROR_UNRECOGNIZED_VOLUME (1005) for every file on Z: unless VOLUME_NAME_NT is requested, and DirectWrite's local font file loader depends on that call. Ordinary reads and memory-mapping of the same files succeed.
Steps to Reproduce
- Share a Mac folder with a Windows 11 VM (it mounts as Z:) and put any
.ttfin it, e.g.Z:\Fonts\Roboto-Regular.ttf. - In the guest, open PowerShell (
powershell.exe -STA) and run:Add-Type -AssemblyName PresentationCore New-Object System.Windows.Media.GlyphTypeface([Uri]'Z:\Fonts\Roboto-Regular.ttf')
- Copy the same file to
C:\Temp\and run the same command against that path. - Optionally run
mountvoland look for Z:.
Current Behavior
-
Step 2 fails with
FileNotFoundException: Unable to find the specified file.Calling DirectWrite directly,IDWriteFactory::CreateFontFileReferencesucceeds butIDWriteFontFile::Analyzereturns0x88985003(DWRITE_E_FILENOTFOUND). -
Step 3 succeeds.
-
mountvoldoesn't list Z:, andGetVolumeNameForVolumeMountPoint("Z:\")fails with error 1005. -
GetFinalPathNameByHandleon an open handle to a file on Z:VOLUME_NAME_DOS: error 1005VOLUME_NAME_GUID: error 1005VOLUME_NAME_NT:\Device\Volume{…}\Fonts\Roboto-Regular.ttf
For a file on C:, all three return a path.
In a real WPF app (.NET 10, run from Z:), the crash looks like this in the Application event log:
System.IO.FileNotFoundException: Unable to find the specified file.
at MS.Internal.Text.TextInterface.DWriteUtil.ConvertHresultToException(Int32 hr)
at MS.Internal.Text.TextInterface.Factory.CreateFontFace(Uri filePathUri, UInt32 faceIndex, FontSimulations fontSimulationFlags)
at System.Windows.Media.GlyphTypeface.Initialize(Uri typefaceSource, StyleSimulations styleSimulations)
at System.Windows.Documents.Glyphs.ParseGlyphRunProperties()
...
Expected Behavior
Files on a shared folder should behave like files on a local disk for path-resolution APIs, so DirectWrite and WPF can load fonts from them. Registering the volume with the Mount Manager would probably fix it; WinFsp does this when the mount point is given as \\.\Z: rather than Z:. virtiofs.exe currently accepts only X: or *, and the VMPal Shared Folders service starts it without options, so there's no way to change this from inside the guest.
Environment
- App version: VMPal 0.80, VMPal Tools 0.54 (also seen on the previous version)
- Mac: MacBook Air, Apple M5, 32 GB
- macOS version: macOS 27.0.1 (26A434)
- VM's OS: Windows 11 24H2 ARM64 (build 26100.4349); WinFsp 2025 (2.1.25156); Z: reported as a fixed disk (DriveType 3), file system VirtIO-FS
Log
No VMPal crash. The guest app crash is shown above.
Activity
sonswift commentedon Oct 17, 2026
We couldn’t reproduce this with VMPal 0.86 (86), VMPal Tools 0.56, and Windows 11 ARM64 24H2 build 26100.9457.
The minimal WPF
GlyphTypefacetest succeeded in three matched pairs using identical font files on the shared drive andC:\Temp. The path-resolution APIs also succeeded, andmountvollistedZ:.Could you retest with the latest VMPal and Tools builds and let us know whether it still occurs? These results don’t establish whether the suspected underlying cause has been fixed.
kgarner99 commentedon Oct 19, 2026
Confirmed that it's fixed in the latest builds. Thanks!