Bulk convert OTF to TTF locally

So, you’ve just downloaded a free font family and it has 6 styles with 20 weight/slant options each but, ‘Oh No!’, they are all otf.

No online converter will chunk those for free but you can do it locally if you have Font Forge installed (Windows instructions only here).

Just find the installation path and the \bin folder containing the main executable to adjust the below command.

Open the command shell (not powershell for this one. I’ll look up the alternative later). CD to the folder containing your otf plethora and run the path adjusted command:

for %f in (*.otf) do "C:\Program Files (x86)\FontForgeBuilds\bin\fontforge.exe" -lang=ff -c "Open('%f'); Generate('%~nf.ttf'); Close();"

Also, If it’s a really nice monospace and you hate those pesky strikethoughs/dots in the zero, you can use the GUI to remove them on the picks of your choice and generate your own version.

4 Likes

I convert them for free here: Everything Fonts OTF to TTF

4 Likes

As far as I can tell the picker there only lets you select one font file at a time. Looks like there may be more than just conversion services though so I’ll have to have a gander at the rest.

cloudconvert lets you batch 5 or so but not 20-30, hence me looking for a local, unlimited batch version

1 Like

many times I have simply changed the extension from otf to ttf and then the font imports into creator just fine :slight_smile:

4 Likes

Hadn’t thought of that. Wouldn’t risk it now though, with additional WFF compatibility worries.

2 Likes

OK. So to simplify things you could create a Scripts folder in your C, or preferably D drive and create a batch file with:

REM Converts all .otf files in the CURRENT directory to .ttf using FontForge
@echo off

for %%f in (*.otf) do "C:\Program Files (x86)\FontForgeBuilds\bin\fontforge.exe" -lang=ff -c "Open('%%f'); Generate('%%~nf.ttf'); Close();"

echo Job's a goodun'

Note the double % in a batch compared to command line
Navigate to your font folder and just run c:\ConvertOTF.bat or similar

I would nest it in [drive]:\Scripts\[scriptname].type

If you want to get all modern you could create ConvertOTF.ps1 containing:

# Converts all .otf files in the CURRENT directory to .ttf using FontForge

$fontforge = "C:\Program Files (x86)\FontForgeBuilds\bin\fontforge.exe"

Get-ChildItem -Path . -Filter *.otf | ForEach-Object {
    $inputFile = $_.FullName -replace '\', '\\' #escape the escape character
    $outputFile = "$($_.DirectoryName)\$($_.BaseName).ttf"
    #Write-Host "Converting $($_.Name) → $($_.BaseName).ttf"
    & $fontforge -lang ff -c "Open('$inputFile'); Generate('$outputFile'); Close();"
}

Write-Host "Job's a goodun'"

I have tested these a couple of times across the Monaspace Static range which has 5 styles and 42 weight/slant variants in each style folder. Each test was a win or fail in seconds across the 42 font files until I got all 42 to go every time in seconds just by calling the batch with no parameters from the folder in cmd/ps

Any issues or improvements you have, feel free to chip in as it is all hacked together from one original command line from a Font Forge help page that was out of date with a smattering of AI syntax reminders here and there.

1 Like