It is well known that the Gabor coefficients can be identified as the values of the windowed Fourier transform, sampled on a rectangular grid in the time-frequency domain. Whereas the relationship between the synthesis window (which acts as a building block in Gabor's signal expansion) and the analysis window (which is used in the windowed Fourier transform) has been investigated extensively, in particular for finding ways to determine the synthesis window when the analysis window is given, less attention has been paid to the influence of the sampling geometry, i.e., the ratio between the sampling distances in the time and the frequency direction. And indeed, if the analysis window is given and we want the synthesis window to resemble a required function as closely as possible, the sampling geometry appears to be rather important. Although the synthesis window will automatically resemble the required function for a sufficiently large degree of oversampling, such a resemblance can be reached for a much smaller degree of oversampling if the sampling geometry is chosen correctly. In this paper we present a method, based on the windowed Fourier transform of the required function, with which the optimum sampling geometry for a given degree of oversampling can be found.