Fin length (fin "span" actually) is measured from the bottom surface of the board to the deepest point perpendicular to the basically flat rear of the board.
Weed fins may be categorized a little differently, but the overall depth that you can sail the board in without the weed fin "dragging" is still the "fin span".
Depending on the configuration of the tip of the fin (i.e curved to the back, squared off,
etc.) the depth is always the max. distance from the bottom of the board in a direction
perpendicular to the flat surface from the front to the back of the fin box cavity.
It does not matter if the front edge, the middle, or the trailing edge (or somewhere in between these) is the point of max. depth.
Where ever the fin would strike the bottom first, that's the point at which you need to measure from the bottom of the board.
Hope this helps,