You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by "Shane (JIRA)" <ji...@apache.org> on 2016/09/08 07:12:20 UTC

[jira] [Created] (BATIK-1159) Batik does not support the "local" keyword in @font-face

Shane created BATIK-1159:
----------------------------

             Summary: Batik does not support the "local" keyword in @font-face
                 Key: BATIK-1159
                 URL: https://issues.apache.org/jira/browse/BATIK-1159
             Project: Batik
          Issue Type: Bug
          Components: CSS
    Affects Versions: 1.7
         Environment: OS X Yosemite
            Reporter: Shane


I have a CSS stylesheet containing markup of the form,

{code}
@font-face {
  font-family: "body";
  src: local("DejaVu Sans"),
    url("data:application/x-font-otf;base64,datadatadatadatadatadata");
}
{code}

When I open this in Batik Squiggle (version 1.7), I get the following error message:

{quote}
SVG Error:

The following stylesheet represents an invalid 
CSS document.
@font-face \{ ... \}

Original message:
The "src" property does not support function values.
{quote}

If I remove the {{local("DejaVu Sans")}}, Batik behaves and renders the font from the data URI.  Support for the *local* keyword is required by [the CSS spec|https://www.w3.org/TR/REC-CSS2/fonts.html#value-def-font-description]:

{quote}
The notation for a <font-face-name> is the full font name, which must be quoted since it may contain any character, including spaces and punctuation, and also must be enclosed in "local(" and ")".
{quote}

This bug prevents Batik from being able to render most modern *@font-family* declaration blocks.  Font distributors like Google and FontSquirrel both have a *local* included by default.

There are a number of issues around the internet with other people running into this problem, like [this one|http://stackoverflow.com/questions/37386077/batik-svg-to-pdf-conversion].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org