I would like to know how to calculate the height of a given a font (with its properties, like size, weight, style...) in a Window Universal Application using Win2D.
But you are already on the right way. Use e. g. fg as text. The f allocates the upper area, the g the lower one, so you get the total height of a text in the current font of the canvas.