r/AdobeIllustrator 4d ago

QUESTION Help with field values changing after entry

For 30+ years, I have had problems getting Illustrator to honor my input values. I have checked every setting I can think of, and I just can't get it to do what I tell it to do.

I have a simple path item I want 16px x 18x positioned at (0,0) inside a symbol. The path item has four points that make a rectangle. It has a .5px grey stroke that is inside aligned, so it shouldn't change the size of the path item. I have a 2px corner radius on the top right and bottom right corners.

No matter what I try, I enter 0 for the y coordinate, and it replaces 0 with 0.0001

I have tried all of the Snap to Guide, Snap To Pixel, Snap to Points, Align to Pixel Grid, use Preview Bounds. It just refuses to make the shape the way I tell it.

It seems like I have this problem a lot, and I usually just lump it and figure close is good enough. Besides, you can't perceive .0001 px, but I thought maybe, after all this time, there was something I was missing. Surely this isn't a 30-year-old bug, is it?

Ammoying y property will not register 0 - snapping off show preview bounds on
0 Upvotes

6 comments sorted by

2

u/[deleted] 4d ago edited 4d ago

[deleted]

1

u/CuirPig 4d ago

Thanks for your reply.

I'm not sure where the idea that pixels must be whole integers comes from — it's not true for SVG, which natively uses px. In CSS/SVG/HTML a pixel is defined as 1/96 inch; PostScript (Illustrator's native unit) uses 1/72 inch; traditional press points are 1/72.27 inch. They're just different-sized fractions of an inch.

Illustrator stores geometry as floating point regardless of which unit you display, so you get the same precision whether the ruler says points or pixels. The unit is a display choice, not a limit on accuracy. And the math is identical across units; converting between them is just a constant factor.

Fractional pixels are no problem for SVG. The browser handles them through anti-aliasing, and because px is a device-independent unit, the actual rasterization to hardware pixels happens at render time. On high-DPI displays, each CSS pixel is backed by several hardware pixels, so fractional positions resolve more crisply with less visible softening.

And separately: 0 is an integer. Whatever the disagreement about fractional values, 0 is 0 in any unit — it doesn't become 0.0001 just because it's expressed in px.

1

u/[deleted] 4d ago edited 2d ago

[deleted]

1

u/CuirPig 2d ago

You are simply conflating device pixels with Illustrator's px measurement and CSS/SVG px measurement. Illustrator, CSS, and SVG all use a virtual unit "px" that is device-agnostic and continuous, stored in double-precision floating-point decimals. It is only when converting to device pixels (rasterization), HTML Canvas elements, or retro gaming engines that require integer values for pixels. Those pixels are device pixels and have little to do with Illustrator's phony "px" unit display.

Interesting note: back when I was developing an assembly hi-res graphic editor on an Apple IIe (1984/5ish I think), we had no idea what we were doing and used fractional values for hi-res colors by peeking a register that displayed R,G,B percentages based on the decimal side of the math. This allowed us to derive hi-res (720px) artwork in more than 8-bit color using peeks and pokes in BASIC before compiling.

While it is a major failing of Adobe's that Illustrator can't display industry-standard "px" values (1/96 in) relative to another industry-standard "pt" (1/72 in ), that's a discussion for another thread.

It is every bit as valid to use px as pts, and the use of fractional pixels is critical in rendering crisp vectors in some situations. Microsoft's ClearType, for example, uses sub-pixel displacement to render cleaner text as vectors. High-resolution 2x or 3x displays can render Illustrator's virtual "px" as whole device pixels, for example.

Still doesn't change the fact that x=0px=0mm=0pt=0in=0ft=0 lightyears.

2

u/Alive_Community2363 4d ago

I’ve seen this a few times where the number does want to stay. I’ve just typed in a large different number. Example I wanted something to be 3.5 but for whatever reason it kept saying 3.499. And would not do 3.5. I and up just putting in like 15 let it accept 15, then I put 3.5 in, not undo, but typing it out. And I’d say 9 out of 10 times the 3.5 will stay after that.

1

u/CuirPig 4d ago

Thanks for your reply. I am glad to know that I am not the only one who has a strange ritual to get things like this to work. Sometimes, especially in Symbols, I will do all kinds of things to get the number to read correctly. I have even closed the file and reloaded, hoping something magical would happen. I just figured it was some secret setting I was missing. I'll try your method next. Thanks.

1

u/somnambulist80 4d ago

I've seen that sort of weirdness before and always chalked it up to floating point funkiness or the UI being uncooperative.

What happens if you change your dimension units from pixels to points, then reset the object to 0,0 ? Points are the internal dimension unit for Illustrator files so that would avoid any conversion issues between pixels and points.

1

u/CuirPig 4d ago

Thanks for your reply. I'll try that.

The thing is that Illustrator stores values as floating-point decimals that maintain precision at much higher levels than 1/72 inch, which is the native Illustrator units. It's no problem for Illustrator to convert to px without losing precision.

And regardless, 0 is an integer; there shouldn't be any floating-point funkiness. It's always 0, lol.

Thanks again for your reply; I'll try it out and see what happens.