Signed-off-by: Esme Povirk esme@codeweavers.com --- Chrono Cross: The Radical Dreamers Edition loads a font like this.
dlls/gdiplus/font.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 6529f94bc1f..0e864068c52 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -1402,7 +1402,8 @@ static WCHAR *load_ttf_name_id( const BYTE *mem, DWORD_PTR size, DWORD id ) header = (const tt_header*)mem; count = GET_BE_WORD(header->tables_no);
- if (GET_BE_WORD(header->major_version) != 1 || GET_BE_WORD(header->minor_version) != 0) + if ((GET_BE_WORD(header->major_version) != 1 || GET_BE_WORD(header->minor_version) != 0) + && (GET_BE_WORD(header->major_version) != 0x4f54 || GET_BE_WORD(header->minor_version) != 0x544f)) return NULL;
pos = sizeof(*header);
On 4/9/22 00:26, Esme Povirk wrote:
- if (GET_BE_WORD(header->major_version) != 1 || GET_BE_WORD(header->minor_version) != 0)
if ((GET_BE_WORD(header->major_version) != 1 || GET_BE_WORD(header->minor_version) != 0)
&& (GET_BE_WORD(header->major_version) != 0x4f54 || GET_BE_WORD(header->minor_version) != 0x544f)) return NULL; pos = sizeof(*header);
This field is specified as uint32 [1], that also makes it more obvious that this is checking for OTTO marker.
[1] https://docs.microsoft.com/en-us/typography/opentype/spec/otff#table-directo...