Skip to content

Commit e9852e8

Browse files
committed
Turn on ligatures for arabic & syriac scripts
1 parent d2ea952 commit e9852e8

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

DesktopEditor/fontengine/TextShaper.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,13 @@ namespace NSShaper
693693
g_userfeatures_init = true;
694694
}
695695

696+
// Turn on ligatures on arabic script
697+
if (nScript == HB_SCRIPT_ARABIC ||
698+
nScript == HB_SCRIPT_SYRIAC)
699+
{
700+
nFeatures |= 1;
701+
}
702+
696703
// font
697704
hb_font_t* pFont;
698705
if (NULL == font)

DesktopEditor/fontengine/js/cpp/text.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,13 @@ WASM_EXPORT unsigned char* ASC_HB_ShapeText(FT_Face pFace, hb_font_t* pFont, cha
594594
g_userfeatures_init = true;
595595
}
596596

597+
// Turn on ligatures on arabic script
598+
if (nScript == HB_SCRIPT_ARABIC ||
599+
nScript == HB_SCRIPT_SYRIAC)
600+
{
601+
nFeatures |= 1;
602+
}
603+
597604
// font
598605
if (NULL == pFont)
599606
{

0 commit comments

Comments
 (0)