Back to Blog
Fontforge script otf to ttf7/2/2023 It can also be that this is a problem with the right paths or possibly also a folder-rights thing. I suspect either there is something one should change in the script (for example I do not know what this sentence from Abraham Lee means when he writes: “… which executes Robert’s script, which requires you to specify the font file that it is creating the JSON file for.” IOError: No such file or directory: ‘json/myfont.log’Īs I know nothing about Python I am not able to solve this on my own. Log = open( outDir fontName.lower() ‘.log’, ‘w ’ ) (Edit: the following problem has now be solved, see the next two posts)įollowing these steps I was able to run the script, unfortunately on my system I encounter some problem running the script.įile “generate_font_metadata.py”, line 70, in I am glad to now know how one has to proceed. Install the font like normal in C:\Windows\Fonts and put the JSON file in C:\Program Files\Common Files\SMuFL\Fonts\Fonts\myfont.Now, generate the font binary by going to File > Generate Fonts then choosing the “OpenType (CFF)” output type, setting the name to “myfont.otf” and hitting “Generate” You will need to rename the JSON file to be just myfont.json since the SMuFL spec recently changed for how the file should be named.Įdit: Have a look at the created json file and take care that the first three lines are written correctly! Once run, you should have two new files in the directory, one for SMuFL called “myfont_metadata.json” and another for LilyPond called “myfont_data.ly” (which is unnecessary for what we’re doing, so you can discard it). This runs a specially compiled version of Python that has access to FontForge’s functions, which executes Robert’s script, which requires you to specify the font file that it is creating the JSON file for. “C:\Program Files (x86)\FontForgeBuilds\bin\ffpython.exe” generate_font_metadata.py myfont.sfd Open up a command prompt and navigate to the directory that contains the SFD file (I’ll call it myfont.sfd below, but you use whatever name you want to call the SFD file) and Robert’s script, then execute the following command: Put Robert’s script in the same directory as the SFD font file because that makes the command line stuff a little easier.Įdit: create also a folder named “json” in this directory! If you have an existing SMuFL font, load it first in FontForge and proceed as described above. Create your own SMuFl font or find a SMuFl font that does not have a json file.Īfter you created your font save the FontForge SFD file, preferably with a name that does not have any spaces in it. You will have to copy the whole code in a text editor and save it as: “generate_font_metadata.py” You can find the last version of FontForge here: FontForge Open Source Font Editor He gave me a comprehensive step by step explanation on how to use the Robert Piechaud script.īefore I write the steps down here are the necessary things you must do before you can run the script. Piechaud script.īTW I now realized that the Bravura json file contains 32152 lines of code for the “glyphBBoxes” metadata and as far as I understand these metadata are only for Finale and they are of no use for Dorico!Ĭonsidering that the whole Bravura json file has 43481 lines I find it quite amazing:ģ2152 lines for Finale and 11329 for Dorico!įor the sake of completeness I write down the last results.Ībraham Lee from Music Type Foundry was so kind to help me. I now must learn to understand what all the Metadata do for the font and what is the difference between an empty json file and one with all metadata.Īnd I still was not able to run the R. Of course “myfont” must be installed as any other font and the json file must be in the right folder at the right place. At least it will allow Dorico to recognize the font. Writing the following four lines in a text editor and saving them as “myfont.json” will work as a so to say default or empty metadata file for the font “myfont”. I just created my first json file from scratchĪs written in the SMuFl specification ( ) only the “fontName” and the “fontVersion” are mandatory for the metadata file.
0 Comments
Read More
Leave a Reply. |