4 ms·
I wasted two days recently trying to make a variable font using free software. The only ressource I found is a youtube video telling me to use a python script f
by simlevesque 3y ago
I wasted two days recently trying to make a variable font using free software. The only ressource I found is a youtube video telling me to use a python script from a google drive.
It didn't work despite many many tries. I have two woffs of the same font that I bought and I wanna make a variable woff2 with only these two variants.
I couldn't believe that there isn't a clear way to do this.
Here's the youtube video: https://youtu.be/xoQuWARCUWI https://youtu.be/xoQuWARCUWI
- kragen 3y agothere is a well-known piece of free software for this called "metafont" (also the original name for the concept here being neologized "variable font"—a "metafont" is an infinite set of fonts produced by an algorithm from input variables) but it doesn't have a gui and can't import woff or truetype
- tribby 3y agoa variable font is a more generic term than a metafont. it’s a bit pedantic but while both have parameters, a metafont is usually parametrically generated based on its concept of a pen, whereas a variable font usually has different parameters that have been defined by manual bezier drawings. I don’t remember if metafont itself can produce a variable font but people have used metapost to go to SVG and then UFO (font source) from there
- kragen 3y agoin metafont (the software) you can define a metafont (a font-valued function) in terms of bézier outlines as well as paths stroked with pens; the relevant metafont commands are 'fill' in the first case and 'draw' (rather than postscript's 'stroke') in the second. it doesn't have an equivalent of postscript's 'eofill'. chapter 13 of the metafontbook describes these commands i don't know if there's a reasonable way to export any standard vector format from metafont; i think there originally wasn't
- ghusbands 3y agoI think you may be missing the point. Metafonts have absolutely nothing to do with "variable fonts". It's a completely different branch of font technology. You cannot produce a variable font as OP intends using metafont.
- kragen 3y agometafonts, as implemented by the metafont program, and variable fonts are literally exactly the same thing: a parameterized font which produces an infinite set of fonts as you vary some parameters i think what you mean to say is that the metafont program isn't compatible with truetype or opentype, but i kind of already explained that in the comment you are replying to
- ghusbands 3y agoNo, "variable font" is not some generic term, especially in context. It refers to a specific technology. See https://en.wikipedia.org/wiki/Variable_font https://en.wikipedia.org/wiki/Variable_font It has nothing at all to do with metafont, even if metafont also supports parameterized fonts.
- kragen 3y agothat page opens by saying it's a generic term, not the specific implementation of the concept in opentype: > A variable font (VF) is a font file that is able to store a continuous range of design variants. this definition is the same thing as the definition of a metafont, and clearly includes the metafonts implemented by the program named metafont. it seems like the authors of the page didn't know about the program named metafont, though, so they mistakenly think apple invented it
- ghusbands 3y agoIt does not claim it's a generic term. The whole page is about variable fonts as derived from "Apple's TrueType GX font variations"; one sentence taken out of context doesn't change that. If you search the internet for variable fonts, you only find people talking about this technology. Parameterized fonts as in metafont have never been called variable fonts and trying to claim otherwise is just creating unnecessary confusion.
- mmmrk 3y agoYou can use the Python library fontTools, which comes with a command line tool called `fonttools varLib`. Prerequisites: 1. you have a so called Designspace file which tells the tool where in the design space the fonts are and 2. The fonts have compatible glyph outlines and font features. For the former, get a random font project like https://gitlab.gnome.org/GNOME/cantarell-fonts/-/blob/master/src/Cantarell.designspace https://gitlab.gnome.org/GNOME/cantarell-fonts/-/blob/master..., install the Python tool fontmake in a venv, and run `fontmake -m Cantarell.desigbspace -o ttf-interpolatable`. In a new subdirectory, you'll find a new Designspace file and TTFs. Switch them out and edit the DS file to make sense. Good luck. For the latter, you are probably out of luck because static fonts are usually compiled in an outline-incompatible way and your only options are to fix them yourself in fontforge or such or ask the original vendor, who is probably going to laugh at you and demand money.
- danielvaughn 3y agoA modern font-rendering tool would indeed be very useful.