[WIN32SS][FONT] Fix GetTextFace function and related (#829)

Google Chrome with -no-sandbox parameter in ReactOS wouldn't display the web page because first-chance exception raised.
CORE-14926

- Remove FullName, Style, and FaceName members from TEXTOBJ structure.
- Add TextFace member into TEXTOBJ structure.
- Add MatchFontName() and MatchFontNames() helper functions.
- Fix GetTextFace() and related.
This commit is contained in:
Katayama Hirofumi MZ 2018-08-30 21:34:03 +09:00 committed by Hermès BÉLUSCA - MAÏTO
parent 56583f3069
commit c8749d379b
3 changed files with 69 additions and 14 deletions

View file

@ -513,12 +513,12 @@ NtGdiGetTextFaceW(
TextObj = RealizeFontInit(hFont);
ASSERT(TextObj != NULL);
fLen = wcslen(TextObj->FaceName) + 1;
fLen = wcslen(TextObj->TextFace) + 1;
if (FaceName != NULL)
{
Count = min(Count, fLen);
Status = MmCopyToCaller(FaceName, TextObj->FaceName, Count * sizeof(WCHAR));
Status = MmCopyToCaller(FaceName, TextObj->TextFace, Count * sizeof(WCHAR));
if (!NT_SUCCESS(Status))
{
TEXTOBJ_UnlockText(TextObj);