GdipFree(backup);
I think you want GdipDeletePath.
This seems very convoluted. Couldn't we just skip the size conversion in get_log_fontW when graphics is NULL? Any cases where the scaling would produce a size other than the em size need to be fixed in GdipAddPathString anyway.