We present an algorithm for generating curves filling the unit square; i.e. space-filling curves, from any given planar substitution satisfying a mild condition. The proposed algorithm is mimicking construction steps of Lebesgue's curve and is based on linear interpolation. Generated space-filling curves for some known substitutions are elucidated. Some of those substitutions further induce relatively dense fractal-like sets in the plane, whenever some additional assumptions are satisfied.