@@ -688,14 +688,16 @@ _hb_directwrite_shape(hb_shape_plan_t *shape_plan,
688688
689689 bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props .direction );
690690
691+ wchar_t w_lang[4 ];
692+ mbstowcs (w_lang, hb_language_to_string (buffer->props .language ), 10 );
691693 hr = analyzer->GetGlyphs (pchars, length,
692694 fontFace, FALSE ,
693695 buffer->props .direction ,
694- &runHead->mScript , NULL , NULL , NULL , NULL , 0 ,
696+ &runHead->mScript , ( const wchar_t *)w_lang , NULL , NULL , NULL , 0 ,
695697 maxGlyphs, clusters, textProperties,
696698 glyphs, glyphProperties, &actualGlyphs);
697699
698- if (hr ! = HRESULT_FROM_WIN32 (ERROR_INSUFFICIENT_BUFFER)) {
700+ if (hr = = HRESULT_FROM_WIN32 (ERROR_INSUFFICIENT_BUFFER)) {
699701 free (clusters);
700702 free (glyphs);
701703 free (textProperties);
@@ -711,7 +713,7 @@ _hb_directwrite_shape(hb_shape_plan_t *shape_plan,
711713 hr = analyzer->GetGlyphs (pchars, length,
712714 fontFace, FALSE ,
713715 buffer->props .direction ,
714- &runHead->mScript , NULL , NULL , NULL , NULL , 0 ,
716+ &runHead->mScript , ( const wchar_t *)w_lang , NULL , NULL , NULL , 0 ,
715717 maxGlyphs, clusters, textProperties,
716718 glyphs, glyphProperties, &actualGlyphs);
717719 }
0 commit comments