It is a central topic in the general theory of function spaces during the last decades to investigate the connection between fractal geometry and function spaces, Fourier analysis and spectral theory of differential operators. We follow a basic idea to study the interplay between fractal geometry and weighted function spaces of Besov and Triebel-Lizorkin type. Throughout what follows, we shall only work with weight functions that belong to some Muckenhoupt class.