The sum of the angles of a triangle on a sphere is $\pi (1+4f) $, where $f$ is the fraction of the area enclosed by the triangle. Then is it true that the sum of the angles of an $n$-polygon is $\pi(n-2+4f)$? By induction, we can divide an $n$-polygon into a $n-1$-polygon and a triangle so the area is $\pi (n-3+4f_{n-1}) + \pi (1+4f_1) = \pi (n-2 +4f_{n-1}+4f_1) = \pi(n-2+4f)$. The only issue is that we have to prove there exists such a geodesic contained in the polygons that divides it as desired. I think this holds in sphere but I'm not sure about other surfaces.
Also I'm curious about the results in other Riemann surface. For sphere we only need to consider the fraction of area because the curvature is constant. What if it's not and how can we express the sum of the angles of triangle in terms of the curvature at the edges?