I am just trying to check Fontlab for color svg files into assigned unicode slots??? I mean to automate the process of importing svg files. Is that easy to do in Fontlab???
Is Fontlab support python and also has internal scripting??? Where can I find more info on implementing the task above for newbee like me???
Just downloaded the app and playing around for creating color/variable font to see the learning curve for me. Any help and direction is very much appreciated. Thanks
FontLab supports Python, for internal scripting. Are you also asking if FontLab can be driven externally from the command line via Python? Not sure about that.
No reason you can’t script it if you have a bunch of external files each with an SVG of a character. In fact, this is something Vassil Kateliev did for our work on Google Symbols / Material Symbols. Too bad it is part of a generally proprietary toolset for that project, else I would happily share the code.
Also, if you drag-and-drop an SVG file into the font window in FontLab, but into empty space rather than a specific slot, it will create a new glyph with the name of the SVG file, leaving off the “.svg” extension.
In the screenshot you show above, all the symbols can easily be represented using a COLR version 0 table, which is more widely supported than the SVG table.
You can turn off OCR and make other important auto-shape-grouping adjustments under Preferences > Operations > Optical Separation — check out the settings there.
Mr. Thomas Phinneyyou saved my headache and now I am very happy. No need to automate the import. The same route thru Sketch board as before but turned off OCR did the trick. But copy/paste svg files did the same as before - going into one place. Not sure individual svg file could be better quality, but this is more than good enough. Thank again and have a nice day!!!
The colour space used for either COLR or SVG is sRGB.
For COLR, the colours are defined in the CPAL table, which supports alternate palettes with each palette supporting up to 65535 colours as well as an app-specified "foreground" colour.
The SVG table allows for colours to be specified directly within the svg markup using the mechanisms defined in the SVG 1.1 spec (e.g., colour keywords, rgb(...), #ffbb00...). But the SVG table also supports colours specified within the CPAL table, which has the advantage of allowing for alternate palettes.
>What are the differences between COLR vs SVG, pro and con???
The OpenType spec now defines two versions for the COLR table. The first version (v0) was very simple for implementations to support, and is the only colour format supported in all browsers and OS platforms. Because the format is very simple, fonts can be very compact. But it was also limited in terms of 2D graphic capabilities: it allows for layered shapes with solid colour fills plus alpha. If you compare the SVG table and COLRv0, the former has much richer graphic capabilities but is less widely supported.
There is now a second version of the COLR table, COLR v1, that has much richer graphic capabilities roughly comparable to that of the SVG table, but using a binary format that is far more compact.
Another important difference is that COLRv0 and COLRv1 integrate well with variations while the SVG table does not integrate with variations at all.
COLRv1 is supported in Chromium-based browsers. Mozilla has work in progress adding support in Firefox. Microsoft has also implemented support in DirectWriteCore in version 1.2 of WinAppSDK (available in experimental release).
One small trick that helps preserve outline quality:
Be sure to scale the placed SVG to the right size, BEFORE you use the “Make SVG Editable” function.
When you “Make SVG Editable,” its coordinates get rounded to the unit grid of the font; doing this on the placed SVG before scaling it up in size, can reduce outline quality, potentially a lot if it was several times smaller than desired. (And Make SVG Editable before scaling down can reduce outline quality a little, just because it will get rounded again at the final size: getting rounded only once is better than getting rounded at two different times.)
In Windows, the DirectWrite/Direct2D and system XAML platforms support OT-SVG and COLRv0, with COLRv1 support coming. But that doesn't mean that apps running on Windows support it---apps need to opt in.
Microsoft Office apps support COLRv0. Mac versions seemed to support some OT-SVG fonts, but other OT-SVG fonts that I tried didn't work.
For browsers, you can use ChromaCheck by PixelAmbacht to test which colour formats are supported. Chromium-based browsers do _not_ support OT-SVG, but Safari and Firefox do. Here's the results for current versions of Edge, Safari and Firefox (Chrome and Opera will be the same as Edge):
COLRv0 is the only format supported in all. I expect COLRv1 will eventually be supported in all browsers, but it's very unlikely OT-SVG will be supported in all.
Adobe apps (but not AfterEffects) support OT-SVG. Adobe doesn't (yet) support COLR.
Corel Graphics Suite 2021 (Mac) supports COLRv0 and sbix, but not OT-SVG.
Affinity Designer and Photo (Windows) supports COLRv0, but not OT-SVG.
Figma doesn't appear to have any colour font support, though emoji fonts seemed to work (I didn't try to figure out why that worked but other colour fonts didn't).
There is a lot of options for font format and also for color options in there. I tried all of the color options OTF-PS and none of them work. I attached the font here and can anyone help me take a look??? Thanks