Despite variability in embryo size, the tissue, organ and body plan develop in proportion with embryo size, known as the scaling phenomenon. Scale-invariant patterning of gene expression is a common feature in development and regeneration, and can be generated by mechanisms such as scaling morphogen gradients and dynamic oscillation. However, whether and how static non-scaling morphogens (input) can induce a scaling gene expression (output) across the entire embryo is not clear. Here we show that scaling requirement sets severe constraints on the geometric structure of the input-output relation (the decoder), from which information about the regulation and mutants' behavior can be deduced without going into any molecular details. We applied and tested our theory on Drosophila gap gene system using the three maternal gradients (Bcd, Nos and Tor) as input. Remarkably, the parameter-free decoder correctly and quantitatively accounted for the gap gene expression patterns in nearly all morphogen mutants. It also revealed the regulation logic and the coding/decoding strategy of the gap gene system. Our work provides a general theoretical framework on a large class of problems where scaling output is induced by non-scaling input, as well as a unified understanding of scaling, mutants' behavior and regulation in the Drosophila gap gene and related systems.