Loading ...
Sorry, an error occurred while loading the content.

SVG embedded fonts -> SVG outlines

Expand Messages
  • voutcher
    Quick question, hopefully, It seems to me that this would be a common problem, but there certainly don t seem to be any solutions on google yet. I want to
    Message 1 of 6 , Apr 1 12:54 AM
    View Source
    • 0 Attachment
      Quick question, hopefully,

      It seems to me that this would be a common problem, but there certainly don't seem to be any solutions on google yet. I want to embed my SVG fonts as outlines in a programatic way. This is because almost all the SVG viewers (Firefox, opera, Adobe) seem to render SVG embedded fonts in a slightly different way, not only this but the output would be for a printer too. Consistency is what I'm looking for.

      I'm really looking for a PHP or .NET solution, the easiest solution i.e. Illustrator isn't possible in our situation.

      I'd also like to generate an EPS from this but it looks like this isn't possible yet.

      If its not possible to convert from svg embedded fonts -> svg outlines then is there a good tutorial to follow about how to combine the elements of an embedded font to 'render' the text myself?

      Thanks for any assistance.
    • Andreas Neumann
      Hi Richard, you hit one of the weak points of SVG implementations - SVG font support. You can actually embed SVG fonts (either a whole font or just the
      Message 2 of 6 , Apr 1 5:56 AM
      View Source
      • 0 Attachment
        Hi Richard,

        you hit one of the "weak" points of SVG implementations - SVG font support.

        You can actually embed SVG fonts (either a whole font or just the glyphs you need). The problem is that at least one browser (namely Firefox) doesn't implement SVG fonts and some older versions of Safari do not implement SVG fonts.

        SVG fonts, however, work well on:

        * Opera 9.x (both embedded and linked)
        * Safari/Webkit (both embedded and linked)
        * ASV3 (IE) (only
        * Batik (both embedded and linked)

        Please note that most of the above viewers/browsers do not support arbitrary contents in SVG fonts, but only the "d" attribute part - but this satisfies most requirements. It means that you can only embed geometry that can be rendered with SVG path elements, not (rects, circles, animated content, gradients, patterns, video, etc.) - but for print oriented output this is not a problem at all.

        Batik and Fontforge help you to convert ttf or type1 fonts to SVG fonts.

        You can happily use SVG fonts with PHP or .net.

        As to EPS export - you can try batikrasterizer which can render to PDF (despite its name it also supports vector PDF output). I am sure there are other tools as well who can export to PDF/EPS - e.g. Inkscape, but Inkscape doesn't support SVG fonts yet.

        Hope this helps,
        Andreas


        --- In svg-developers@yahoogroups.com, "voutcher" <richard_vout@...> wrote:
        >
        > Quick question, hopefully,
        >
        > It seems to me that this would be a common problem, but there certainly don't seem to be any solutions on google yet. I want to embed my SVG fonts as outlines in a programatic way. This is because almost all the SVG viewers (Firefox, opera, Adobe) seem to render SVG embedded fonts in a slightly different way, not only this but the output would be for a printer too. Consistency is what I'm looking for.
        >
        > I'm really looking for a PHP or .NET solution, the easiest solution i.e. Illustrator isn't possible in our situation.
        >
        > I'd also like to generate an EPS from this but it looks like this isn't possible yet.
        >
        > If its not possible to convert from svg embedded fonts -> svg outlines then is there a good tutorial to follow about how to combine the elements of an embedded font to 'render' the text myself?
        >
        > Thanks for any assistance.
        >
      • voutcher
        Thanks for the reply, I ve beaten around the bush with SVG fonts, they would be good except for the fact that I am using a proprietary font, so as I understand
        Message 3 of 6 , Apr 2 10:09 AM
        View Source
        • 0 Attachment
          Thanks for the reply,

          I've beaten around the bush with SVG fonts, they would be good except for the fact that I am using a proprietary font, so as I understand it, I'm not allowed to embed the fonts in the usual way due to the licence.

          What I need to do is to try to extract the path information from the glyph elements and kerning and then just combine it into a single <g> element. I think I would then just have a straightforward text outline which wouldn't infringe any licence.

          Are there any resources on how to properly combine the glyph elements?

          --- In svg-developers@yahoogroups.com, "Andreas Neumann" <a.neumann@...> wrote:
          >
          > Hi Richard,
          >
          > you hit one of the "weak" points of SVG implementations - SVG font support.
          >
          > You can actually embed SVG fonts (either a whole font or just the glyphs you need). The problem is that at least one browser (namely Firefox) doesn't implement SVG fonts and some older versions of Safari do not implement SVG fonts.
          >
          > SVG fonts, however, work well on:
          >
          > * Opera 9.x (both embedded and linked)
          > * Safari/Webkit (both embedded and linked)
          > * ASV3 (IE) (only
          > * Batik (both embedded and linked)
          >
          > Please note that most of the above viewers/browsers do not support arbitrary contents in SVG fonts, but only the "d" attribute part - but this satisfies most requirements. It means that you can only embed geometry that can be rendered with SVG path elements, not (rects, circles, animated content, gradients, patterns, video, etc.) - but for print oriented output this is not a problem at all.
          >
          > Batik and Fontforge help you to convert ttf or type1 fonts to SVG fonts.
          >
          > You can happily use SVG fonts with PHP or .net.
          >
          > As to EPS export - you can try batikrasterizer which can render to PDF (despite its name it also supports vector PDF output). I am sure there are other tools as well who can export to PDF/EPS - e.g. Inkscape, but Inkscape doesn't support SVG fonts yet.
          >
          > Hope this helps,
          > Andreas
          >
          >
          > --- In svg-developers@yahoogroups.com, "voutcher" <richard_vout@> wrote:
          > >
          > > Quick question, hopefully,
          > >
          > > It seems to me that this would be a common problem, but there certainly don't seem to be any solutions on google yet. I want to embed my SVG fonts as outlines in a programatic way. This is because almost all the SVG viewers (Firefox, opera, Adobe) seem to render SVG embedded fonts in a slightly different way, not only this but the output would be for a printer too. Consistency is what I'm looking for.
          > >
          > > I'm really looking for a PHP or .NET solution, the easiest solution i.e. Illustrator isn't possible in our situation.
          > >
          > > I'd also like to generate an EPS from this but it looks like this isn't possible yet.
          > >
          > > If its not possible to convert from svg embedded fonts -> svg outlines then is there a good tutorial to follow about how to combine the elements of an embedded font to 'render' the text myself?
          > >
          > > Thanks for any assistance.
          > >
          >
        • Andreas Neumann
          I am not a law expert - but if you just embed the glyphs you need (as opposed to the whole font-set) you probably can also embed a proprietary font - but I may
          Message 4 of 6 , Apr 3 10:29 AM
          View Source
          • 0 Attachment
            I am not a law expert - but if you just embed the glyphs you need (as opposed to the whole font-set) you probably can also embed a proprietary font - but I may be wrong.

            To be on the safe side I would also look if you can use a free font. There are more and more free fonts available.

            Andreas


            --- In svg-developers@yahoogroups.com, "voutcher" <richard_vout@...> wrote:
            >
            > Thanks for the reply,
            >
            > I've beaten around the bush with SVG fonts, they would be good except for the fact that I am using a proprietary font, so as I understand it, I'm not allowed to embed the fonts in the usual way due to the licence.
            >
            > What I need to do is to try to extract the path information from the glyph elements and kerning and then just combine it into a single <g> element. I think I would then just have a straightforward text outline which wouldn't infringe any licence.
            >
            > Are there any resources on how to properly combine the glyph elements?
            >
            > --- In svg-developers@yahoogroups.com, "Andreas Neumann" <a.neumann@> wrote:
            > >
            > > Hi Richard,
            > >
            > > you hit one of the "weak" points of SVG implementations - SVG font support.
            > >
            > > You can actually embed SVG fonts (either a whole font or just the glyphs you need). The problem is that at least one browser (namely Firefox) doesn't implement SVG fonts and some older versions of Safari do not implement SVG fonts.
            > >
            > > SVG fonts, however, work well on:
            > >
            > > * Opera 9.x (both embedded and linked)
            > > * Safari/Webkit (both embedded and linked)
            > > * ASV3 (IE) (only
            > > * Batik (both embedded and linked)
            > >
            > > Please note that most of the above viewers/browsers do not support arbitrary contents in SVG fonts, but only the "d" attribute part - but this satisfies most requirements. It means that you can only embed geometry that can be rendered with SVG path elements, not (rects, circles, animated content, gradients, patterns, video, etc.) - but for print oriented output this is not a problem at all.
            > >
            > > Batik and Fontforge help you to convert ttf or type1 fonts to SVG fonts.
            > >
            > > You can happily use SVG fonts with PHP or .net.
            > >
            > > As to EPS export - you can try batikrasterizer which can render to PDF (despite its name it also supports vector PDF output). I am sure there are other tools as well who can export to PDF/EPS - e.g. Inkscape, but Inkscape doesn't support SVG fonts yet.
            > >
            > > Hope this helps,
            > > Andreas
            > >
            > >
            > > --- In svg-developers@yahoogroups.com, "voutcher" <richard_vout@> wrote:
            > > >
            > > > Quick question, hopefully,
            > > >
            > > > It seems to me that this would be a common problem, but there certainly don't seem to be any solutions on google yet. I want to embed my SVG fonts as outlines in a programatic way. This is because almost all the SVG viewers (Firefox, opera, Adobe) seem to render SVG embedded fonts in a slightly different way, not only this but the output would be for a printer too. Consistency is what I'm looking for.
            > > >
            > > > I'm really looking for a PHP or .NET solution, the easiest solution i.e. Illustrator isn't possible in our situation.
            > > >
            > > > I'd also like to generate an EPS from this but it looks like this isn't possible yet.
            > > >
            > > > If its not possible to convert from svg embedded fonts -> svg outlines then is there a good tutorial to follow about how to combine the elements of an embedded font to 'render' the text myself?
            > > >
            > > > Thanks for any assistance.
            > > >
            > >
            >
          • Dailey, David P.
            This code: O=document.getElementById( E ) try{SVGDoc=O.contentDocument} catch(err){SVGDoc=O.getSVGDocument} as seen at
            Message 5 of 6 , Apr 3 12:21 PM
            View Source
            • 0 Attachment
              This code:



              O=document.getElementById("E")

              try{SVGDoc=O.contentDocument}

              catch(err){SVGDoc=O.getSVGDocument}



              as seen at http://srufaculty.sru.edu/david.dailey/svg/objectSVG3.html

              works just fine everywhere*. If I don't offer contentDocument as a
              possibility, then it works everywhere but Firefox.



              However, if I chance the order of the try / catch and try the
              getSVGDocument first, then FF complains and halts midst the try{}



              Why would that be?



              cheers

              David

              * IE/ASV, Opera, Chrome, Safari, Firefox.

              From: svg-developers@yahoogroups.com
              [mailto:svg-developers@yahoogroups.com] On Behalf Of Andreas Neumann
              Sent: Friday, April 03, 2009 1:29 PM
              To: svg-developers@yahoogroups.com
              Subject: [svg-developers] Re: SVG embedded fonts -> SVG outlines



              I am not a law expert - but if you just embed the glyphs you need (as
              opposed to the whole font-set) you probably can also embed a proprietary
              font - but I may be wrong.

              To be on the safe side I would also look if you can use a free font.
              There are more and more free fonts available.

              Andreas

              --- In svg-developers@yahoogroups.com
              <mailto:svg-developers%40yahoogroups.com> , "voutcher"
              <richard_vout@...> wrote:
              >
              > Thanks for the reply,
              >
              > I've beaten around the bush with SVG fonts, they would be good except
              for the fact that I am using a proprietary font, so as I understand it,
              I'm not allowed to embed the fonts in the usual way due to the licence.
              >
              > What I need to do is to try to extract the path information from the
              glyph elements and kerning and then just combine it into a single <g>
              element. I think I would then just have a straightforward text outline
              which wouldn't infringe any licence.
              >
              > Are there any resources on how to properly combine the glyph elements?
              >
              > --- In svg-developers@yahoogroups.com
              <mailto:svg-developers%40yahoogroups.com> , "Andreas Neumann"
              <a.neumann@> wrote:
              > >
              > > Hi Richard,
              > >
              > > you hit one of the "weak" points of SVG implementations - SVG font
              support.
              > >
              > > You can actually embed SVG fonts (either a whole font or just the
              glyphs you need). The problem is that at least one browser (namely
              Firefox) doesn't implement SVG fonts and some older versions of Safari
              do not implement SVG fonts.
              > >
              > > SVG fonts, however, work well on:
              > >
              > > * Opera 9.x (both embedded and linked)
              > > * Safari/Webkit (both embedded and linked)
              > > * ASV3 (IE) (only
              > > * Batik (both embedded and linked)
              > >
              > > Please note that most of the above viewers/browsers do not support
              arbitrary contents in SVG fonts, but only the "d" attribute part - but
              this satisfies most requirements. It means that you can only embed
              geometry that can be rendered with SVG path elements, not (rects,
              circles, animated content, gradients, patterns, video, etc.) - but for
              print oriented output this is not a problem at all.
              > >
              > > Batik and Fontforge help you to convert ttf or type1 fonts to SVG
              fonts.
              > >
              > > You can happily use SVG fonts with PHP or .net.
              > >
              > > As to EPS export - you can try batikrasterizer which can render to
              PDF (despite its name it also supports vector PDF output). I am sure
              there are other tools as well who can export to PDF/EPS - e.g. Inkscape,
              but Inkscape doesn't support SVG fonts yet.
              > >
              > > Hope this helps,
              > > Andreas
              > >
              > >
              > > --- In svg-developers@yahoogroups.com
              <mailto:svg-developers%40yahoogroups.com> , "voutcher" <richard_vout@>
              wrote:
              > > >
              > > > Quick question, hopefully,
              > > >
              > > > It seems to me that this would be a common problem, but there
              certainly don't seem to be any solutions on google yet. I want to embed
              my SVG fonts as outlines in a programatic way. This is because almost
              all the SVG viewers (Firefox, opera, Adobe) seem to render SVG embedded
              fonts in a slightly different way, not only this but the output would be
              for a printer too. Consistency is what I'm looking for.
              > > >
              > > > I'm really looking for a PHP or .NET solution, the easiest
              solution i.e. Illustrator isn't possible in our situation.
              > > >
              > > > I'd also like to generate an EPS from this but it looks like this
              isn't possible yet.
              > > >
              > > > If its not possible to convert from svg embedded fonts -> svg
              outlines then is there a good tutorial to follow about how to combine
              the elements of an embedded font to 'render' the text myself?
              > > >
              > > > Thanks for any assistance.
              > > >
              > >
              >





              [Non-text portions of this message have been removed]
            • Bradley Neuberg
              Perhaps try this trick: var doc; if (typeof o.getSVGDocument != undefined ) { doc = o.getSVGDocument(); } else { doc = o.contentDocument; } ... [Non-text
              Message 6 of 6 , Apr 3 5:51 PM
              View Source
              • 0 Attachment
                Perhaps try this trick:

                var doc;
                if (typeof o.getSVGDocument != 'undefined') {
                doc = o.getSVGDocument();
                } else {
                doc = o.contentDocument;
                }

                On Fri, Apr 3, 2009 at 12:21 PM, Dailey, David P. <david.dailey@...>wrote:

                > This code:
                >
                > O=document.getElementById("E")
                >
                > try{SVGDoc=O.contentDocument}
                >
                > catch(err){SVGDoc=O.getSVGDocument}
                >
                > as seen at http://srufaculty.sru.edu/david.dailey/svg/objectSVG3.html
                >
                > works just fine everywhere*. If I don't offer contentDocument as a
                > possibility, then it works everywhere but Firefox.
                >
                > However, if I chance the order of the try / catch and try the
                > getSVGDocument first, then FF complains and halts midst the try{}
                >
                > Why would that be?
                >
                > cheers
                >
                > David
                >
                > * IE/ASV, Opera, Chrome, Safari, Firefox.
                >
                > From: svg-developers@yahoogroups.com <svg-developers%40yahoogroups.com>
                > [mailto:svg-developers@yahoogroups.com <svg-developers%40yahoogroups.com>]
                > On Behalf Of Andreas Neumann
                > Sent: Friday, April 03, 2009 1:29 PM
                > To: svg-developers@yahoogroups.com <svg-developers%40yahoogroups.com>
                > Subject: [svg-developers] Re: SVG embedded fonts -> SVG outlines
                >
                > I am not a law expert - but if you just embed the glyphs you need (as
                > opposed to the whole font-set) you probably can also embed a proprietary
                > font - but I may be wrong.
                >
                > To be on the safe side I would also look if you can use a free font.
                > There are more and more free fonts available.
                >
                > Andreas
                >
                > --- In svg-developers@yahoogroups.com <svg-developers%40yahoogroups.com>
                > <mailto:svg-developers%40yahoogroups.com<svg-developers%2540yahoogroups.com>>
                > , "voutcher"
                > <richard_vout@...> wrote:
                > >
                > > Thanks for the reply,
                > >
                > > I've beaten around the bush with SVG fonts, they would be good except
                > for the fact that I am using a proprietary font, so as I understand it,
                > I'm not allowed to embed the fonts in the usual way due to the licence.
                > >
                > > What I need to do is to try to extract the path information from the
                > glyph elements and kerning and then just combine it into a single <g>
                > element. I think I would then just have a straightforward text outline
                > which wouldn't infringe any licence.
                > >
                > > Are there any resources on how to properly combine the glyph elements?
                > >
                > > --- In svg-developers@yahoogroups.com <svg-developers%40yahoogroups.com>
                > <mailto:svg-developers%40yahoogroups.com<svg-developers%2540yahoogroups.com>>
                > , "Andreas Neumann"
                > <a.neumann@> wrote:
                > > >
                > > > Hi Richard,
                > > >
                > > > you hit one of the "weak" points of SVG implementations - SVG font
                > support.
                > > >
                > > > You can actually embed SVG fonts (either a whole font or just the
                > glyphs you need). The problem is that at least one browser (namely
                > Firefox) doesn't implement SVG fonts and some older versions of Safari
                > do not implement SVG fonts.
                > > >
                > > > SVG fonts, however, work well on:
                > > >
                > > > * Opera 9.x (both embedded and linked)
                > > > * Safari/Webkit (both embedded and linked)
                > > > * ASV3 (IE) (only
                > > > * Batik (both embedded and linked)
                > > >
                > > > Please note that most of the above viewers/browsers do not support
                > arbitrary contents in SVG fonts, but only the "d" attribute part - but
                > this satisfies most requirements. It means that you can only embed
                > geometry that can be rendered with SVG path elements, not (rects,
                > circles, animated content, gradients, patterns, video, etc.) - but for
                > print oriented output this is not a problem at all.
                > > >
                > > > Batik and Fontforge help you to convert ttf or type1 fonts to SVG
                > fonts.
                > > >
                > > > You can happily use SVG fonts with PHP or .net.
                > > >
                > > > As to EPS export - you can try batikrasterizer which can render to
                > PDF (despite its name it also supports vector PDF output). I am sure
                > there are other tools as well who can export to PDF/EPS - e.g. Inkscape,
                > but Inkscape doesn't support SVG fonts yet.
                > > >
                > > > Hope this helps,
                > > > Andreas
                > > >
                > > >
                > > > --- In svg-developers@yahoogroups.com<svg-developers%40yahoogroups.com>
                > <mailto:svg-developers%40yahoogroups.com<svg-developers%2540yahoogroups.com>>
                > , "voutcher" <richard_vout@>
                > wrote:
                > > > >
                > > > > Quick question, hopefully,
                > > > >
                > > > > It seems to me that this would be a common problem, but there
                > certainly don't seem to be any solutions on google yet. I want to embed
                > my SVG fonts as outlines in a programatic way. This is because almost
                > all the SVG viewers (Firefox, opera, Adobe) seem to render SVG embedded
                > fonts in a slightly different way, not only this but the output would be
                > for a printer too. Consistency is what I'm looking for.
                > > > >
                > > > > I'm really looking for a PHP or .NET solution, the easiest
                > solution i.e. Illustrator isn't possible in our situation.
                > > > >
                > > > > I'd also like to generate an EPS from this but it looks like this
                > isn't possible yet.
                > > > >
                > > > > If its not possible to convert from svg embedded fonts -> svg
                > outlines then is there a good tutorial to follow about how to combine
                > the elements of an embedded font to 'render' the text myself?
                > > > >
                > > > > Thanks for any assistance.
                > > > >
                > > >
                > >
                >
                > [Non-text portions of this message have been removed]
                >
                >
                >


                [Non-text portions of this message have been removed]
              Your message has been successfully submitted and would be delivered to recipients shortly.