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.
Vincent Povirk madewokherd@gmail.com wrote:
GdipFree(backup);
I think you want GdipDeletePath.
Other places of GdipAddPathString implementation need this fixed as well then.
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.
GdipAddPathString already creates an HDC to select hfont into it, so using graphics object created from it seems pretty straightforward.
GdipFree(backup);
I think you want GdipDeletePath.
Other places of GdipAddPathString implementation need this fixed as well then.
Nope, the existing use of GdipFree on backup is correct because the extra data associated with it has been copied to the original path (which had its data freed). Not the clearest way of doing things but it works.
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.
GdipAddPathString already creates an HDC to select hfont into it, so using graphics object created from it seems pretty straightforward.
Fair enough. On closer inspection, it looks like the behavior should be the same as before, so it doesn't really matter. I just prefer less memory management, all other things being equal.