When the path to the font file is too long, a COMException with message "UNABLE_TO_MASK_PATH" will be thrown. I have enabled "LongPathsEnabled" in regedit and declared "longPathAware" in app.manifest.
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
When the path to the font file is too long, a COMException with message "UNABLE_TO_MASK_PATH" will be thrown. I have enabled "LongPathsEnabled" in regedit and declared "longPathAware" in app.manifest.