Text X Position
txt-x
Defines the x-coordinate of the text in relation to the left-most edge of the base image.
The value can be positive or negative, written either as a whole number of pixels or as a decimal fraction of the image (see below). If the value is negative, the image will be partially outside the base image boundary. The txt-x parameter will overwrite txt-align=left, txt-align=center, txt-align=right, and txt-pad (in the horizontal direction) if set. Use txt-x[N] to override this for a specific text layer — bare txt-x applies to every layer by default.
Pixels or a Fraction
How the number is written decides its unit. A whole number such as 20 is pixels multiplied by dpr, as it has always been. A decimal written with a dot from 0 to 1 inclusive — 0.05, .5, 1.0 — is a fraction instead, and is never multiplied by dpr. Anything else, such as 2.5, is read as pixels.
So txt-x=1 is one pixel, while txt-x=1.0 is the full width of the image. One URL written with fractions therefore holds its proportions at every width and dpr.