Invalid font names in the Microsoft MSIX Packaging Tool (2022.110)

%3CLINGO-SUB%20id%3D%22lingo-sub-3254905%22%20slang%3D%22en-US%22%3EInvalid%20font%20names%20in%20the%20Microsoft%20MSIX%20Packaging%20Tool%20(2022.110)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3254905%22%20slang%3D%22en-US%22%3E%3CP%3EI%20filed%20an%20issue%20a%20long%20time%20ago%20about%20the%20syntax%20constraints%20of%20the%20AppXManifest%20when%20it%20comes%20to%20having%20font%20files%20where%20the%20filename%20has%20problematic%20characters%20in%20the%20file%20name%2C%20such%20as%20the%20space%20character.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPrior%20versions%20of%20the%20MMPT%20were%20ignoring%20all%20installed%20fonts%2C%20so%20I%20have%20been%20working%20around%20the%20issue%20myself%2C%20but%20now%20the%20MMPT%20is%20trying%20add%20fonts%20into%20the%20AppXManifest%2C%20and%20fonts%20with%20the%20unusual%20names%20now%20cause%20MakeAppX%20to%20fail%20within%20the%20MMPT.%26nbsp%3B%20Here%20is%20example%20output%20from%20the%20MMPT%20log%20showing%20the%20error%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%5BN2WorkerA%5D%3A%20MakeAppx%20%3A%20error%3A%20Failure%20at%20packageWriter2-%26gt%3BClose(%20manifestStream%2C%20contentGroupMapStream.Get())%20-%200x80080204%20-%20The%20specified%20package%20format%20is%20not%20valid%3A%20The%20package%20manifest%20is%20not%20valid.%3CBR%20%2F%3E%5BN2WorkerA%5D%3A%20MakeAppx%20%3A%20error%3A%20Error%20info%3A%20%2F*%5Blocal-name()%3D%22Package%22%20and%20namespace-uri()%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Ffoundation%2Fwindows10%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Ffoundation%2Fwindows10%3C%2FA%3E%22%5D%2F*%5Blocal-name()%3D%22Applications%22%20and%20namespace-uri()%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Ffoundation%2Fwindows10%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Ffoundation%2Fwindows10%3C%2FA%3E%22%5D%5B1%5D%2F*%5Blocal-name()%3D%22Application%22%20and%20namespace-uri()%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Ffoundation%2Fwindows10%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Ffoundation%2Fwindows10%3C%2FA%3E%22%5D%5B1%5D%2F*%5Blocal-name()%3D%22Extensions%22%20and%20namespace-uri()%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Ffoundation%2Fwindows10%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Ffoundation%2Fwindows10%3C%2FA%3E%22%5D%5B1%5D%2F*%5Blocal-name()%3D%22Extension%22%20and%20namespace-uri()%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fuap%2Fwindows10%2F4%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fuap%2Fwindows10%2F4%3C%2FA%3E%22%5D%5B1%5D%2F*%5Blocal-name()%3D%22SharedFonts%22%20and%20namespace-uri()%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fuap%2Fwindows10%2F4%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fuap%2Fwindows10%2F4%3C%2FA%3E%22%5D%5B1%5D%2F*%5Blocal-name()%3D%22Font%22%20and%20namespace-uri()%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fuap%2Fwindows10%2F4%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fuap%2Fwindows10%2F4%3C%2FA%3E%22%5D%5B1%5D%2F%40File%3CBR%20%2F%3E%5BN2WorkerA%5D%3A%20'VFS%5CFonts%5C%25C3%2586%2520Systematic%2520TT%2520BRK.ttf'%20violates%20pattern%20constraint%20of%20'%5B%5E%26lt%3B%26gt%3B%22%3A%25%5C%7C%5C%3F%5C*%5Cx01-%5Cx1f%5D%2B'.%3CBR%20%2F%3E%5BN2WorkerA%5D%3A%20The%20attribute%20'File'%20with%20value%20'VFS%5CFonts%5C%25C3%2586%2520Systematic%2520TT%2520BRK.ttf'%20failed%20to%20parse.%3CBR%20%2F%3E%5BN2WorkerA%5D%3A%20Cleaning%20up%20output%20file%20%22%5C%5C%3F%5C%25UserProfile%25%5CAppData%5CLocal%5CTemp%5Cb57e223b-1fee-46c3-871b-e312b90f0969.msix%22.%3CBR%20%2F%3E%5BN2WorkerA%5D%3A%20MakeAppx%20%3A%20error%3A%20Failure%20at%20(CreatePackage(%20overwrite%2C%20hashAlgorithm%2C%20fileList%2C%20outputPath%2C%20manifestStream.Get()%2C%20forceCompressionNone%2C%20performanceOptions%2C%20encryptPackage%2C%20encryptionOptions%2C%20cgmPath%2C%20mainPackagePathForResourceExemption%2C%20makepriExeFullPath))%20-%200x80080204%20-%20The%20specified%20package%20format%20is%20not%20valid%3A%20The%20package%20manifest%20is%20not%20valid.%3CBR%20%2F%3E%5BN2WorkerA%5D%3A%20MakeAppx%20%3A%20error%3A%20Package%20creation%20failed.%3CBR%20%2F%3E%5BN2WorkerA%5D%3A%20MakeAppx%20%3A%20error%3A%200x80080204%20-%20The%20specified%20package%20format%20is%20not%20valid%3A%20The%20package%20manifest%20is%20not%20valid.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMy%20workaround%20for%20the%20issue%20had%20been%20to%20detect%20the%20font%20file%20and%20simply%20rename%20the%20file%20to%20have%20a%20valid%20pattern%20before%20adding%20to%20the%20manifest.%26nbsp%3B%20The%20actual%20filename%20is%20not%20of%20importance%20except%20for%20filename%20conflict%20within%20the%20Windows%2FFonts%20folder%20where%20they%20are%20traditionally%20installed%20to.%26nbsp%3B%20(When%20containerized%2C%20we%20only%20have%20to%20worry%20about%20name%20conflict%20within%20that%20package).%26nbsp%3B%20Applications%20reference%20the%20fonts%20using%20attributes%20internal%20to%20the%20file%20and%20not%20the%20filename%2C%20thus%20during%20the%20packaging%20process%20renaming%20the%20file%20and%20registering%20the%20renamed%20file%20in%20the%20AppXManifest%20works%20great.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFonts%20with%20such%20names%20typically%20come%20from%20apps%20that%20are%20multi-platform%20and%20started%20out%20on%20Linux.%26nbsp%3B%20The%20MMPT%20should%20either%20rename%20the%20file%20as%20part%20of%20the%20capture%20processing%20(best)%2C%20or%20outright%20ignore%20the%20file%20with%20a%20warning%20added%20into%20the%20log%20file%2C%20but%20it%20should%20in%20any%20case%20produce%20a%20valid%20package.%26nbsp%3B%20Of%20course%2C%20fixing%20the%20manifest%20validation%20would%20be%20the%20ideal%20solution%2C%20but%20if%20it%20hasn't%20happened%20after%20a%20couple%20of%20years%20I%20guess%20that%20ship%20has%20sailed!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3273611%22%20slang%3D%22en-US%22%3ERe%3A%20Invalid%20font%20names%20in%20the%20Microsoft%20MSIX%20Packaging%20Tool%20(2022.110)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3273611%22%20slang%3D%22en-US%22%3EDone.%20This%20app%20is%20just%20a%20simple%20test%20app%20I%20created%20that%20shows%20the%20problem%20easily.%20Originally%20found%20the%20issue%20in%20a%20gnarly%20vendor%20app.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3273342%22%20slang%3D%22en-US%22%3ERe%3A%20Invalid%20font%20names%20in%20the%20Microsoft%20MSIX%20Packaging%20Tool%20(2022.110)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3273342%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Timothy%2C%20can%20you%20please%20give%20me%20access%20to%20this%20file.%20Here's%20my%20alias%20%3A%20mridulgupta%40microsoft.com%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3272925%22%20slang%3D%22en-US%22%3ERe%3A%20Invalid%20font%20names%20in%20the%20Microsoft%20MSIX%20Packaging%20Tool%20(2022.110)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3272925%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F145112%22%20target%3D%22_blank%22%3E%40Sharla_Akers%3C%2FA%3E%26nbsp%3BSee%20file%20for%20a%20link.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3272893%22%20slang%3D%22en-US%22%3ERe%3A%20Invalid%20font%20names%20in%20the%20Microsoft%20MSIX%20Packaging%20Tool%20(2022.110)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3272893%22%20slang%3D%22en-US%22%3EHi%20Timothy%2C%20%3CBR%20%2F%3E%3CBR%20%2F%3EAs%20always%2C%20thank%20you%20for%20the%20detailed%20feedback!%20Would%20you%20be%20able%20to%20share%20with%20us%20the%20package%20with%20fonts%20that%20you%20are%20using%20so%20we%20can%20work%20on%20improving%20this%20experience%3F%20%3CBR%20%2F%3E%3CBR%20%2F%3EBest%2C%3CBR%20%2F%3ESharla%3C%2FLINGO-BODY%3E
MVP

I filed an issue a long time ago about the syntax constraints of the AppXManifest when it comes to having font files where the filename has problematic characters in the file name, such as the space character.

 

Prior versions of the MMPT were ignoring all installed fonts, so I have been working around the issue myself, but now the MMPT is trying add fonts into the AppXManifest, and fonts with the unusual names now cause MakeAppX to fail within the MMPT.  Here is example output from the MMPT log showing the error:

 

[N2WorkerA]: MakeAppx : error: Failure at packageWriter2->Close( manifestStream, contentGroupMapStream.Get()) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
[N2WorkerA]: MakeAppx : error: Error info: /*[local-name()="Package" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"]/*[local-name()="Applications" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/*[local-name()="Application" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/*[local-name()="Extensions" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/*[local-name()="Extension" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/uap/windows10/4"][1]/*[local-name()="SharedFonts" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/uap/windows10/4"][1]/*[local-name()="Font" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/uap/windows10/4"][1]/@File
[N2WorkerA]: 'VFS\Fonts\%C3%86%20Systematic%20TT%20BRK.ttf' violates pattern constraint of '[^<>":%\|\?\*\x01-\x1f]+'.
[N2WorkerA]: The attribute 'File' with value 'VFS\Fonts\%C3%86%20Systematic%20TT%20BRK.ttf' failed to parse.
[N2WorkerA]: Cleaning up output file "\\?\%UserProfile%\AppData\Local\Temp\b57e223b-1fee-46c3-871b-e312b90f0969.msix".
[N2WorkerA]: MakeAppx : error: Failure at (CreatePackage( overwrite, hashAlgorithm, fileList, outputPath, manifestStream.Get(), forceCompressionNone, performanceOptions, encryptPackage, encryptionOptions, cgmPath, mainPackagePathForResourceExemption, makepriExeFullPath)) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
[N2WorkerA]: MakeAppx : error: Package creation failed.
[N2WorkerA]: MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.

 

My workaround for the issue had been to detect the font file and simply rename the file to have a valid pattern before adding to the manifest.  The actual filename is not of importance except for filename conflict within the Windows/Fonts folder where they are traditionally installed to.  (When containerized, we only have to worry about name conflict within that package).  Applications reference the fonts using attributes internal to the file and not the filename, thus during the packaging process renaming the file and registering the renamed file in the AppXManifest works great.  

 

Fonts with such names typically come from apps that are multi-platform and started out on Linux.  The MMPT should either rename the file as part of the capture processing (best), or outright ignore the file with a warning added into the log file, but it should in any case produce a valid package.  Of course, fixing the manifest validation would be the ideal solution, but if it hasn't happened after a couple of years I guess that ship has sailed!

 

4 Replies
Hi Timothy,

As always, thank you for the detailed feedback! Would you be able to share with us the package with fonts that you are using so we can work on improving this experience?

Best,
Sharla

@Sharla_Akers See file for a link.

Hi Timothy, can you please give me access to this file. Here's my alias : mridulgupta@microsoft.com

Done. This app is just a simple test app I created that shows the problem easily. Originally found the issue in a gnarly vendor app.