Bug 1625590 Part 2: Make ScaledFontDWrite::GetFontFileName include the null terminator in the returned file name. r=jrmuizel

This ensures that CreateFromFontDescriptor gets the null-terminated WCHAR
that it expects.

Differential Revision: https://phabricator.services.mozilla.com/D96478
This commit is contained in:
Brad Werth 2020-11-19 16:59:31 +00:00
parent 295b2ec8d4
commit 7bd4cba91e

View File

@ -377,7 +377,7 @@ static bool GetFontFileName(RefPtr<IDWriteFontFace> aFontFace,
gfxDebug() << "Invalid file \"" << aFileName.data() << "\" for WR font";
return false;
}
aFileName.pop_back();
// We leave the null terminator at the end of the returned file name.
return true;
}