nfroidure / ttf2woff2

Convert ttf files to woff2.
MIT License
297 stars 39 forks source link

Error while converting a font #84

Open bye-csavier opened 5 months ago

bye-csavier commented 5 months ago

I wanted to convert Bodoni Moda font into a woff2 font but I get the following error:

Start-Process : Cannot convert 'System.Object[]' to the type 'System.String' required by parameter
'RedirectStandardInput'. Specified method is not supported.
At line:1 char:45
+ ... f2woff2.cmd -rsi BodoniModa-Italic-VariableFont_opsz,wght.ttf -rso Bo ...
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Start-Process], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.PowerShell.Commands.StartProcessCommand

Start-Process : Cannot convert 'System.Object[]' to the type 'System.String' required by parameter
'RedirectStandardInput'. Specified method is not supported.
At line:1 char:45
+ ... wait ttf2woff2.cmd -rsi BodoniModa-VariableFont_opsz,wght.ttf -rso Bo ...
+                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Start-Process], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.PowerShell.Commands.StartProcessCommand

I use a bat script to get the files and the command used to call ttf2woff2 is this one: powershell -Command "start-process -nnw -wait ttf2woff2.cmd -rsi %%F -rso !FILE!.woff2"