A general weight function for a subsurface crack in a two dimensional half-space