Let \(\Gamma \subset \mathbb {C}\) be a curve of class \(C(1,\alpha )\) . For \(z_{0}\) in the unbounded component of \(\mathbb {C}\setminus \Gamma \) , and for \(n=1,2,...\) , let \(\nu _n\) be a probability measure with \(\mathop {\textrm{supp}}\nolimits (\nu _{n})\subset \Gamma \) which minimizes the Bergman function \(B_{n}(\nu ,z):=\sum _{k=0}^{n}|q_{k}^{\nu }(z)|^{2}\) at \(z_{0}\) among all probability measures \(\nu \) on \(\Gamma \) (here, \(\{q_{0}^{\nu },\ldots ,q_{n}^{\nu }\}\) are an orthonormal basis in \(L^2(\nu )\) for the holomorphic polynomials of degree at most n). We show that \(\{\nu _{n}\}_n\) tends weak-* to \({{\widehat{\delta }}}_{z_{0}}\) , the balayage of the point mass at \(z_0\) onto \(\Gamma \) , by relating this to an optimization problem for probability measures on the unit circle. Our proof makes use of estimates for Faber polynomials associated to \(\Gamma \) .