Re: Please add support for IEEE float number in SVG

This is an interesting suggestion.

SVG 2 is harmonizing with CSS for number formats
<>, so the addition
should be made there.

If you're able to file issues via GitHub, I'd recommend doing so here:
Tag it in the subject line as [css-syntax][css-values]

That said, I can see a few obstacles:

   - SVG currently only requires single-precision floats
   <>, not double.  CSS
   doesn't currently specify precision requirements; there is an open issue
   suggesting that it should be formally made undefined behavior (#4552)

   - The `#nnnnnnnn` format is already used in CSS and SVG for colors.
   Parsing would be ambiguous in some CSS properties.

   - CSS (and SVG) are mostly harmonizing with JavaScript (ECMAScript) for
   any new Math-related features, and JavaScript doesn't have any hex-based
   formats for floats.

You might get more support for a request to specify the parsing/rounding
rules for converting between decimal representation and binary floats
(which would most likely match the ECMAScript specification
<>, and use the "round to nearest,
with ties to even" rule). With this guaranteed, you could be confident that
a decimal version of a number would always parse into the same binary
representation. But first, the precision level (single or double float)
would need to be defined.

~Amelia Bellamy-Royds

On Wed, 4 Dec 2019 at 20:44, Hồ Châu <> wrote:

> please add this feature: use hex float number instead decimal number. Use
> float hex number not lose precision from convert decimal when write file,
> then convert back to hex when read file. Useful for use SVG replace PDF and
> precision very important for high detail screen for high quslity printer.
> Example SVG file here use big endian IEEE float format for draw black
> circle with radius 100 at (50; 50), fill opacity 1.0:
> <svg version="1.1"  width="100" height="100" >
> <circle cx="#42480000" cy="#42480000" r="#42C80000" fill="#000000"
> fill-opacity="#3F800000" stroke="none" />
> </svg>
> Châu

Received on Thursday, 5 December 2019 05:49:40 UTC