Finite-size corrections for inclined interfaces in two dimensions: Exact results for Ising and solid-on-solid models