svg fonts

Could someone enlighten me about svg fonts please.
How much support do they have – is it the future?
And Is it possible to have each glyph as a high res image?
Thanks!

Comments

  • Thomas Phinney
    Thomas Phinney Posts: 2,887
    edited February 2019
    Which kind of SVG fonts do you mean? (Although the answer to the second question is “yes” either way.)

    I think OpenType-SVG is well on its way to becoming most common format for color fonts (and perhaps also for bitmap fonts). It is already the best supported of the formats. More people are making fonts in this format than the others. And there are technical reasons behind this, both in terms of ease of supporting the format and the flexibility/power of the format. It's not perfect, but it is pretty good and it is winning the color-font-format wars.

    The older SVG font format I think will continue to exist in pockets, but won’t be any more widely used than it is today (which is to say: not very).

    Although OpenType-SVG has a few restrictions on what you can do in the SVG portion, it is more than flexible enough for font purposes. It can handle bitmaps/pixels or vectors, and complex effects with either.

    So, yes you can have a high-res pixel-based image for each glyph. Or a vector drawing (including color, gradients, transparency, etc.) that can be scaled to any size at all.
  • Inside this technology there can be two types of images, raster and vector. Raster allows you to achieve photo-realism and special effects. The vector is known to be better at scaling.
  • Jeff Peters
    Jeff Peters Posts: 36
    edited February 2019
    Thanks, sounds interesting. The downside to raster image glyphs being the scalability of course – even if each glyph is 1200 ppi you can't scale it up much. And it seems things can get quite slow, too.

  • And yes Thomas, I was talking about OpenType-SVG – I didn't know of anything else.
  • Wich kind of curves are used in OpenType SVG ? CFF ot TTF ?
  • Thomas Phinney
    Thomas Phinney Posts: 2,887
    edited February 2019
    Thanks, sounds interesting. The downside to raster image glyphs being the scalability of course – even if each glyph is 1200 ppi you can't scale it up much. And it seems things can get quite slow, too.
    The font itself does not have pixels per inch on the design side, just pixels. The output pixel density is dependent on how the font is scaled at display time.

    But if you mean glyphs that are 1200 pixels, yes, I expect that performance with such a font might be very bad—dependent also on the number of glyphs involved, the device doing the display, etc. etc. Such a font might best be used sparingly indeed.

    If we are talking about drop caps where you might normally only use one on a page, of course that might be no problem in the main use case.... Except when somebody tries to display a substantial sample of the font, which happens pretty often! At least WYSIWYG font menus tend to use caching, but, well, general “ouch.”

    Which kind of curves are used in OpenType SVG ? CFF or TTF ?

    OpenType SVG supports most of SVG 1.1 (with a few specific exceptions). This support includes cubic Bezier curves (like CFF), quadratic Bezier curves (like TTF), and also elliptical arcs.

    Note that while the math describing the curves is the same as that in CFF or TTF, there are major differences in implementation. OpenType SVG fonts do not support any kind of hinting code, so their on-screen rendering may be worse than, or at least differ, from that of fonts.
  • @Thomas Phinney Thanks a lot for your precisions.
  • Thomas Phinney
    Thomas Phinney Posts: 2,887
    edited February 2019
    Oops, I missed a word. My last sentence should have read “their on-screen rendering may be worse than, or at least differ from, that of ‘normal’ OTF/TTF fonts.”
  • SVG as a technology has ties to HTML 5 Canvas and modern CSS. It is often used as a foundation to animate things in applications such as Tumult Hype, because SVG itself can be made part of the web application’s code. Therefore I think SVG fonts could provide an easier, more accessible bridge for those developers utilizing SVG in their HTML 5 and CSS development. Imagine animated logos using an SVG font instead of outlined shapes directly.
    All of this is just my speculation based on the little I know about these subjects.
  • Thomas Phinney
    Thomas Phinney Posts: 2,887
    Thanks, Seb! Lots of good thoughts.

    I think SVG-OT’s capability to handle bitmaps as well as vectors, and to allow for gradients, are two significant strengths that are missing in COLR+CPAL. But I will grant you that COLR+CPAL has a number of strengths. My first thought was that SVG-OT would win in the long run, as one can also do bitmaps in that format, and everybody already has SVG rasterizers. But everybody already has TT rasterizers, as well.