• Zhiyi Zhang's avatar
    gdiplus: Search microsoft platform names first in load_ttf_name_id(). · 9786ee25
    Zhiyi Zhang authored
    Search names in fonts in the order of Microsoft, Mac and finally Unicode platform. This is also the
    order win32u uses to load font names.
    
    Fix Granado Espada Japan (1219160) launcher crashes at start in the Japanese locale. The game ships
    a font with a broken name record of Mac platform and encoding ID 0 (Roman) but the name string is in
    code page 10001 (Japanese). This broken name record is placed before the name records for the
    Microsoft platform so it gets selected first. Then the name string in the name record doesn't get
    converted correctly to Unicode because of the wrong code page. Thus the EnumFontFamiliesExW()
    in GdipPrivateAddMemoryFont() fails to find the font and causes game crash.
    9786ee25
font.c 54.4 KB