  We introduce a new family of metrics, called functional metrics, on
noncommutative tori and study their spectral geometry. We define a class of
Laplace type operators for these metrics and study their spectral invariants
obtained from the heat trace asymptotics. A formula for the second density of
the heat trace is obtained. In particular, the scalar curvature density and the
total scalar curvature of functional metrics are explicitly computed in all
dimensions for certain classes of metrics including conformally flat metrics
and twisted product of flat metrics. Finally a Gauss-Bonnet type theorem for a
noncommutative two torus equipped with a general functional metric is proved.
