The instruction of converting otf to ttf on Mac
Reason
Microsoft has trouble with .otf files, opting to emit a bitmap rather than text when generating PDFs that reference these fonts. We should convert all our existing .otf files to .ttf and redploy them.
Steps
- Install fontforge
brew install fontforge - Use fontforge script to convert otf file
- create a fontforge script convert.ff file like following, first line is the path of your fontforge, default one is #!/usr/local/bin/fontforge
#!/opt/homebrew/bin/fontforge i=1 while ( i<$argc ) Open($argv[i]) Generate($argv[i]:r + ".ttf") i = i+1 endloopchmod +x convert.ff- convert all otf files to ttf.
./convert.ff *.otf
- create a fontforge script convert.ff file like following, first line is the path of your fontforge, default one is #!/usr/local/bin/fontforge
Reference
answers.microsoft.com/en-us/msoff… fontforge.org/docs/tutori…