Color Font Issues

Hello guys,

I am working on an OpenType SVG color font and am facing a few issues.
It should have both gradient and texture grain (therefore I thought SVG fonts are the most efficient solution).

  1. Bounding box cutting — when opening the file in Photoshop the bounding box is getting cut (the shadows and sides should stir out of the letterbox). I consider mostly the bounding box cutting sideways, not from the top and bottom since I haven’t yet calculated the vertical metrics and hopefully it would render better there.

The cutting happens both with the vector SVG (#1) and the raster SVGs (#2 and #4). The #3 is an OTF for comparison. The raster SVGs have more denser texture from the vector one.

  1. Web support — Although, it is being discussed in the tutorial that OpenType-SVG fonts are supported only in Firefox and MS Edge. Is there any workaround?

As you can see from the screenshots Firefox only supports the vector SVG and not the raster SVG. (Here the bounding box Is fine, by the way).
Safari makes the vector SVG one single black color. And unfortunately, the Chrome does not support any of them.

  1. Adobe CC support — Aftereffects, for instance, does not support any color font. Not even the system Trajan Color. Could you propose some workaround?

Thank you for your attention!

On which macOS?

HI Rainer!

My MacOS is Catalina v. 10.15.6.

It might have to do with the bounding box stored in one of the header tables. Can you add a quite big rect to any glyph (don’t need to be one you ever use). This might solve the clipping.

How did you make the SVGs? All three browsers should be able to render svg, with and without image data.

Hi Georg!

In any case, I have to calculate the vertical metrics to solve the clipping in the verticals. But would that solve it in the horizontal clipping? I am sorry but I can’t understand what do you mean to add a rect, what is it?

Can you add a quite big rect to any glyph (don’t need to be one you ever use). This might solve the clipping.

The screenshots from the web browsers are showing a one single test font with one half raster-based SVG and the other half — vector-based SVG.
The vector-based SVG was created in Adobe Illustrator on an artboard sized 1000 x 1000 px and saved as SVG with the default settings:


It was positioned it in a subfolder Images adjacent to the Glyphs file. Then I dragged each SVG file into the newly created SVG sublayer.

The raster-based SVG I created on the same sized artboard (square 1000 px) with the same vector-based letter but its shadow was a masked bitmap image. I saved the file as PDF and reopened it from Photoshop. From then I exported it as SVG and dragged it the same way as the vect0r-based letters:

(Sidenote: At the screenshot above the Image size is being increased maybe depending from the resolution but the input is exactly 1000x1000 UPMs. However, I can decrease it too in PS in 1000 UPMs).

All three browsers should be able to render svg, with and without image data.

The browsers show in most cases blank letters (without any letter in them). Do you mean that or something else?

Draw a glyph like this:

1 Like

I have some good updates concerning the OpenType-SVG fonts:

  1. Bounding box — it is necessary to place a fallback glyph at the Master layer (or at least a rectangle bigger than the SVG object). That solves the clipping of the BBox.
    The option to put a rectangle in another glyph does not solve it.

  2. Adobe CC support — color fonts are usable in After Effects — you can do so by importing as either .ai (preferrable) or .psd files.

  3. Web support — the color fonts get supported In Chrome, Safari and Opera with the addition of 2 custom parameters according to your handy tutorial to create CPAL/COLR font. Hooray!

1 Like