  We study the influence of boundary conditions on self-affine random functions
u(t) in the interval t/L \in [0,1], with independent Gaussian Fourier modes of
variance ~ 1/q^{\alpha}. We consider the probability distribution of the mean
square width of u(t) taken over the whole interval or in a window t/L \in [x,
x+\delta]. Its characteristic function can be expressed in terms of the
spectrum of an infinite matrix. This distribution strongly depends on the
boundary conditions of u(t) for finite \delta, but we show that it is universal
(independent of boundary conditions) in the small-window limit. We compute it
directly for all values of \alpha, using, for \alpha<3, an asymptotic expansion
formula that we derive. For \alpha > 3, the limiting width distribution is
independent of \alpha. It corresponds to an infinite matrix with a single
non-zero eigenvalue. We give the exact expression for the width distribution in
this case. Our analysis facilitates the estimation of the roughness exponent
from experimental data, in cases where the standard extrapolation method cannot
be used
