Measures with predetermined regularity and inhomogeneous self-similar sets