[DirectWrite.Samples] Fixed CustomLayout sample

The algorithm of determining glyph proprieties was implemented to perform 2 tries. After the first try - it resets computed parameters in preparation for the second try (look in diff), but if the first try is successful - the parameters remain reset which leads to "invalid arg" error on the next DW API call - this pull request fixes the issue.