[cairo] [Bug 90166] Add a way to specify units (in SVG output)
Antonio Ospite
ao2 at ao2.it
Mon Oct 16 14:16:41 UTC 2017
On Mon, 16 Oct 2017 18:32:10 +1030
Adrian Johnson <ajohnson at redneon.com> wrote:
> On 16/10/17 18:24, David Kastrup wrote:
> > Frankly, this is not just the "SVG abbreviations". It's TeX terminology
> > as well as used in HTML/CSS. Programmers will tend to know the two
> > character abbreviations better than the long names (FONT_X ? For real?).
> >
> > This does not look like an actual improvement to me. That it prompts a
> > bikeshedding discussion should be proof enough that this makes things
> > more rather than less arbitrary and harder rather than easier to guess.
>
> I'm open to suggestions.
>From the comments, it looks like leaving the original names for the
units seems acceptable, they may not be the easiest for everyone but
they are standard, simple and more consistent in form (except PERCENT,
and USER, sure), and I tried to document their meaning in the API doc.
About reordering the enum, I'd just like to point out that the
current order is taken from the CSS spec itself, we don't have to
necessarily follow it, but it was like that for some reason.
That said, just tell me how you want the enum ordered and I'll follow.
After we sort out the ordering doubt I will submit a v2 with a
clearer documentation and a getter function.
Finally, I think that allowing also relative units to be used in the
final document is OK, AFAICS their are all valid for width and height,
at least according to SVG schema from here:
https://github.com/oreillymedia/HTMLBook/tree/master/schema/svg
I can validate Cairo SVGs like this:
1. Get all the files from here:
https://github.com/ao2/HTMLBook/tree/svg-schema-add-version-attribute/schema/svg
The original schema from w3c does not work with xmllint, and it
does not seem to be _official_ anyways.
2. Run the test program in the bug report to create the svg files, and
then:
$ for file in svg_output_*.svg; do xmllint --noout --schema SVG.xsd "$file"; done
Ciao,
Antonio
--
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
More information about the cairo
mailing list