  Let $d$ and $k$ be positive integers. Let $\mu$ be a positive Borel measure
on $\mathbb{R}^2$ possessing finite moments up to degree $2d-1$. If the support
of $\mu$ is contained in an algebraic curve of degree $k$, then we show that
there exists a quadrature rule for $\mu$ with at most $dk$ many nodes all
placed on the curve (and positive weights) that is exact on all polynomials of
degree at most $2d-1$. This generalizes both Gauss and (the odd degree case of)
Szeg\H{o} quadrature where the curve is a line and a circle, respectively, to
arbitrary plane algebraic curves. We use this result to show that, without any
hypothesis on the support of $\mu$, there is always a cubature rule for $\mu$
with at most $\frac32d(d-1)+1$ many nodes. In both results, we show that the
quadrature or cubature rule can be chosen such that its value on a certain
positive definite form of degree $2d$ is minimized. We characterize the unique
Gaussian quadrature rule on the line as the one that minimizes this value or
several other values as for example the sum of the nodes' distances to the
origin. The tools we develop should prove useful for obtaining similar results
in higher-dimensional cases although at the present stage we can present only
partial results in that direction.
