44#define FIRST_ARABIC_CHAR 0x0600
45#define LAST_ARABIC_CHAR 0x06ff
492 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_devanagari_features,
MS_MAKE_TAG(
'd',
'e',
'v',
'2'),
ContextualShape_Devanagari,
ShapeCharGlyphProp_Devanagari},
493 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_devanagari_features,
MS_MAKE_TAG(
'd',
'e',
'v',
'2'),
ContextualShape_Devanagari,
NULL},
494 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_bengali_features,
MS_MAKE_TAG(
'b',
'n',
'g',
'2'),
ContextualShape_Bengali,
ShapeCharGlyphProp_Bengali},
495 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_bengali_features,
MS_MAKE_TAG(
'b',
'n',
'g',
'2'),
ContextualShape_Bengali,
NULL},
496 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_bengali_features,
MS_MAKE_TAG(
'b',
'n',
'g',
'2'),
ContextualShape_Bengali,
ShapeCharGlyphProp_Bengali},
497 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_gurmukhi_features,
MS_MAKE_TAG(
'g',
'u',
'r',
'2'),
ContextualShape_Gurmukhi,
ShapeCharGlyphProp_Gurmukhi},
498 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_gurmukhi_features,
MS_MAKE_TAG(
'g',
'u',
'r',
'2'),
ContextualShape_Gurmukhi,
NULL},
499 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_devanagari_features,
MS_MAKE_TAG(
'g',
'j',
'r',
'2'),
ContextualShape_Gujarati,
ShapeCharGlyphProp_Gujarati},
500 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_devanagari_features,
MS_MAKE_TAG(
'g',
'j',
'r',
'2'),
ContextualShape_Gujarati,
NULL},
501 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_devanagari_features,
MS_MAKE_TAG(
'g',
'j',
'r',
'2'),
ContextualShape_Gujarati,
ShapeCharGlyphProp_Gujarati},
502 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_oriya_features,
MS_MAKE_TAG(
'o',
'r',
'y',
'2'),
ContextualShape_Oriya,
ShapeCharGlyphProp_Oriya},
503 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_oriya_features,
MS_MAKE_TAG(
'o',
'r',
'y',
'2'),
ContextualShape_Oriya,
NULL},
504 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_tamil_features,
MS_MAKE_TAG(
't',
'm',
'l',
'2'),
ContextualShape_Tamil,
ShapeCharGlyphProp_Tamil},
505 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_tamil_features,
MS_MAKE_TAG(
't',
'm',
'l',
'2'),
ContextualShape_Tamil,
NULL},
506 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_telugu_features,
MS_MAKE_TAG(
't',
'e',
'l',
'2'),
ContextualShape_Telugu,
ShapeCharGlyphProp_Telugu},
507 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_telugu_features,
MS_MAKE_TAG(
't',
'e',
'l',
'2'),
ContextualShape_Telugu,
NULL},
508 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_telugu_features,
MS_MAKE_TAG(
'k',
'n',
'd',
'2'),
ContextualShape_Kannada,
ShapeCharGlyphProp_Kannada},
509 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_telugu_features,
MS_MAKE_TAG(
'k',
'n',
'd',
'2'),
ContextualShape_Kannada,
NULL},
510 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_telugu_features,
MS_MAKE_TAG(
'm',
'l',
'm',
'2'),
ContextualShape_Malayalam,
ShapeCharGlyphProp_Malayalam},
511 {{
devanagari_features, 6}, {
devanagari_gpos_features, 4},
required_telugu_features,
MS_MAKE_TAG(
'm',
'l',
'm',
'2'),
ContextualShape_Malayalam,
NULL},
555 WORD *glyphs,
unsigned int glyph_index,
int write_dir,
int *glyph_count)
568 TRACE(
"lookups found no glyphs\n");
645 OpenType_GetFontFeatureTags(psc,
script, language,
FALSE,
MS_MAKE_TAG(feat[0],feat[1],feat[2],feat[3]), tableType, 1, &
tags, &cTags, &
feature);
654 OpenType_GetFontFeatureTags(psc,
script,
MS_MAKE_TAG(
'd',
'f',
'l',
't'),
FALSE,
MS_MAKE_TAG(feat[0],feat[1],feat[2],feat[3]), tableType, 1, &
tags, &cTags, &
feature);
670 TRACE(
"applying feature %s\n",feat);
734 rc =
count - glyph_count;
748 if (!pGlyphProp[
i].sva.fClusterStart)
753 if (pwLogClust[
j] ==
i)
756 while (
k >= 0 &&
k <
cChars && !pGlyphProp[pwLogClust[
k]].sva.fClusterStart)
758 if (
k >= 0 &&
k <
cChars && pGlyphProp[pwLogClust[
k]].sva.fClusterStart)
759 pwLogClust[
j] = pwLogClust[
k];
766static void UpdateClusters(
int nextIndex,
int changeCount,
int write_dir,
int chars,
WORD* pwLogClust )
768 if (changeCount == 0)
772 int cluster_dir = pwLogClust[0] < pwLogClust[chars-1] ? 1 : -1;
774 int target_glyph = nextIndex - write_dir;
775 int target_index = -1;
776 int replacing_glyph = -1;
782 target_glyph = nextIndex - changeCount;
784 target_glyph = nextIndex + (changeCount + 1);
788 if (target_index == -1)
790 ERR(
"Unable to find target glyph\n");
797 for (
i = target_index; i < chars && i >= 0;
i += cluster_dir)
799 if (pwLogClust[
i] == target_glyph)
801 if(pwLogClust[
i] == replacing_glyph)
802 pwLogClust[
i] = target_glyph;
806 if (changed >= changeCount)
808 replacing_glyph = pwLogClust[
i];
809 pwLogClust[
i] = target_glyph;
817 for (
i = target_index; i < chars && i >= 0;
i += cluster_dir)
819 if (pwLogClust[
i] != target_glyph)
820 pwLogClust[
i] += changeCount;
825 for (
i = target_index; i < chars && i >= 0;
i += cluster_dir)
826 pwLogClust[
i] += changeCount;
843 for (lookup_index = 0; lookup_index <
feature->lookup_count; lookup_index++)
851 TRACE(
"applying lookup (%i/%i)\n",lookup_index,
feature->lookup_count);
852 while(i < *pcGlyphs && i >= 0)
855 INT prevCount = *pcGlyphs;
858 if (*pcGlyphs != prevCount)
877 unsigned int start_idx,
i,
j;
881 start_idx =
dir < 0 ? glyph_count - 1 : 0;
884 for (
j = 0;
j < glyph_count; )
886 feature->lookups[
i], glyphs, start_idx +
dir *
j, glyph_count, goffset);
904 if (*pcGlyphs >= maxGlyphs)
906 for (
i = *pcGlyphs-1;
i>=
index;
i--)
907 pwGlyphs[
i+1] = pwGlyphs[
i];
908 pwGlyphs[
index] = glyph;
909 *pcGlyphs = *pcGlyphs+1;
921 WCHAR invalid = 0x25cc;
929 context_type[
i] = lex(pwcChars[
i]);
934 if (context_type[
i] != 0 && context_type[
i+write_dir]==context_type[
i])
959 if (pwcChars[
i] < 0x1C)
972 if (
i+ delta >= cchLen)
989 if (
i+ delta >= cchLen)
999 if (context_type[
i] ==
jtT)
1002 return context_type[
i];
1007 return joining_type ==
jtL || joining_type ==
jtD;
1012 return joining_type ==
jtR || joining_type ==
jtD;
1020 return (chr == 0 || chr == 0x20 );
1025 enum {Arab_Norm = 0, Arab_DIAC1, Arab_DIAC2, Arab_DIAC3, Arab_DIAC4, Arab_DIAC5, Arab_DIAC6, Arab_DIAC7, Arab_DIAC8};
1036 case 0x06E1:
return Arab_DIAC1;
1039 case 0x0656:
return Arab_DIAC2;
1040 case 0x0651:
return Arab_DIAC3;
1056 case 0x06EC:
return Arab_DIAC4;
1059 case 0x06ED:
return Arab_DIAC5;
1060 case 0x0670:
return Arab_DIAC6;
1061 case 0x0653:
return Arab_DIAC7;
1063 case 0x0654:
return Arab_DIAC8;
1064 default:
return Arab_Norm;
1082 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
1100 context_shape =
malloc(
cChars *
sizeof(*context_shape));
1108 context_shape[
i] =
Xr;
1110 context_shape[
i] =
Xl;
1112 context_shape[
i] =
Xm;
1114 context_shape[
i] =
Xr;
1116 context_shape[
i] =
Xl;
1118 context_shape[
i] =
Xn;
1123 char_index = glyph_index = 0;
1125 char_index = glyph_index =
cChars-1;
1127 while(char_index < cChars && char_index >= 0)
1134 INT prevCount = *pcGlyphs;
1139 if (prevCount != *pcGlyphs)
1141 offset = *pcGlyphs - prevCount;
1143 glyph_index -=
offset * dirL;
1154 glyph_index = nextIndex;
1157 offset = *pcGlyphs - prevCount;
1158 glyph_index += dirL * (
offset + 1);
1165 glyph_index += dirL;
1172 if (context_shape[char_index] ==
Xn)
1174 WORD newGlyph = pwOutGlyphs[glyph_index];
1179 if (context_char != pwcChars[char_index] &&
1182 pwOutGlyphs[glyph_index] = newGlyph;
1186 glyph_index += dirL;
1190 free(context_shape);
1198 enum {Hebr_Norm=0, Hebr_DIAC, Hebr_CANT1, Hebr_CANT2, Hebr_CANT3, Hebr_CANT4, Hebr_CANT5, Hebr_CANT6, Hebr_CANT7, Hebr_CANT8, Hebr_CANT9, Hebr_CANT10, Hebr_DAGESH, Hebr_DOTABV, Hebr_HOLAM, Hebr_METEG, Hebr_PATAH, Hebr_QAMATS, Hebr_RAFE, Hebr_SHINSIN};
1209 case 0x05BB:
return Hebr_DIAC;
1213 case 0x05AE:
return Hebr_CANT1;
1216 case 0x05AC:
return Hebr_CANT2;
1222 case 0x05AB:
return Hebr_CANT3;
1226 case 0x059F:
return Hebr_CANT4;
1228 case 0x05A0:
return Hebr_CANT5;
1230 case 0x05A5:
return Hebr_CANT6;
1233 case 0x05A6:
return Hebr_CANT7;
1236 case 0x05AA:
return Hebr_CANT8;
1238 case 0x05AD:
return Hebr_CANT9;
1239 case 0x05AF:
return Hebr_CANT10;
1240 case 0x05BC:
return Hebr_DAGESH;
1241 case 0x05C4:
return Hebr_DOTABV;
1242 case 0x05B9:
return Hebr_HOLAM;
1243 case 0x05BD:
return Hebr_METEG;
1244 case 0x05B7:
return Hebr_PATAH;
1245 case 0x05B8:
return Hebr_QAMATS;
1246 case 0x05BF:
return Hebr_RAFE;
1248 case 0x05C2:
return Hebr_SHINSIN;
1249 default:
return Hebr_Norm;
1259 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
1277 enum {Syriac_Norm=0, Syriac_DIAC1, Syriac_DIAC2, Syriac_DIAC3, Syriac_DIAC4, Syriac_DIAC5, Syriac_DIAC6, Syriac_DIAC7, Syriac_DIAC8, Syriac_DIAC9, Syriac_DIAC10, Syriac_DIAC11, Syriac_DIAC12, Syriac_DIAC13, Syriac_DIAC14, Syriac_DIAC15, Syriac_DIAC16, Syriac_DIAC17};
1285 case 0x73D:
return Syriac_DIAC1;
1290 case 0x73E:
return Syriac_DIAC2;
1293 case 0x74A:
return Syriac_DIAC3;
1296 case 0x73F:
return Syriac_DIAC4;
1299 case 0x73C:
return Syriac_DIAC5;
1301 case 0x30A:
return Syriac_DIAC6;
1303 case 0x325:
return Syriac_DIAC7;
1305 case 0x303:
return Syriac_DIAC8;
1310 case 0x331:
return Syriac_DIAC9;
1311 case 0x308:
return Syriac_DIAC10;
1312 case 0x304:
return Syriac_DIAC11;
1313 case 0x307:
return Syriac_DIAC12;
1314 case 0x323:
return Syriac_DIAC13;
1315 case 0x743:
return Syriac_DIAC14;
1316 case 0x744:
return Syriac_DIAC15;
1317 case 0x745:
return Syriac_DIAC16;
1318 case 0x746:
return Syriac_DIAC17;
1319 default:
return Syriac_Norm;
1338 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
1359 context_shape =
malloc(
cChars *
sizeof(*context_shape));
1366 if (pwcChars[
i] ==
ALAPH)
1371 context_shape[
i] =
Afj;
1372 else if ( rchar !=
DALATH && rchar !=
RISH &&
1375 context_shape[
i] =
Afn;
1377 context_shape[
i] =
Afx;
1379 context_shape[
i] =
Xn;
1381 else if (context_type[
i] ==
jtR &&
1383 context_shape[
i] =
Xr;
1385 context_shape[
i] =
Xl;
1387 context_shape[
i] =
Xm;
1389 context_shape[
i] =
Xr;
1391 context_shape[
i] =
Xl;
1393 context_shape[
i] =
Xn;
1398 char_index = glyph_index = 0;
1400 char_index = glyph_index =
cChars-1;
1402 while(char_index < cChars && char_index >= 0)
1405 INT prevCount = *pcGlyphs;
1410 if (prevCount != *pcGlyphs)
1412 offset = *pcGlyphs - prevCount;
1414 glyph_index -=
offset * dirL;
1424 glyph_index = nextIndex;
1427 offset = *pcGlyphs - prevCount;
1428 glyph_index += dirL * (
offset + 1);
1434 glyph_index += dirL;
1438 free(context_shape);
1446 enum {Thaana_Norm=0, Thaana_FILI};
1459 case 0x7AF:
return Thaana_FILI;
1460 default:
return Thaana_Norm;
1470 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
1486#define phags_pa_CANDRABINDU 0xA873
1487#define phags_pa_START 0xA840
1488#define phags_pa_END 0xA87F
1500 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
1520 context_shape =
malloc(
cChars *
sizeof(*context_shape));
1531 if (jrchar && jlchar)
1532 context_shape[
i] =
Xm;
1534 context_shape[
i] =
Xr;
1536 context_shape[
i] =
Xl;
1538 context_shape[
i] =
Xn;
1541 context_shape[
i] = -1;
1546 char_index = glyph_index = 0;
1548 char_index = glyph_index =
cChars-1;
1550 while(char_index < cChars && char_index >= 0)
1552 if (context_shape[char_index] >= 0)
1555 INT prevCount = *pcGlyphs;
1561 glyph_index = nextIndex;
1567 glyph_index += dirL;
1573 glyph_index += dirL;
1577 free(context_shape);
1583 enum {Thai_Norm=0, Thai_ABOVE1, Thai_ABOVE2, Thai_ABOVE3, Thai_ABOVE4, Thai_BELOW1, Thai_BELOW2, Thai_AM};
1591 case 0xE37:
return Thai_ABOVE1;
1593 case 0xE4D:
return Thai_ABOVE2;
1597 case 0xE4B:
return Thai_ABOVE3;
1599 case 0xE4E:
return Thai_ABOVE4;
1601 case 0xE39:
return Thai_BELOW1;
1602 case 0xE3A:
return Thai_BELOW2;
1603 case 0xE33:
return Thai_AM;
1604 default:
return Thai_Norm;
1614 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
1628 enum {Lao_Norm=0, Lao_ABOVE1, Lao_ABOVE2, Lao_BELOW1, Lao_BELOW2, Lao_AM};
1638 case 0xECD:
return Lao_ABOVE1;
1643 case 0xECC:
return Lao_ABOVE2;
1644 case 0xEBC:
return Lao_BELOW1;
1646 case 0xEB9:
return Lao_BELOW2;
1647 case 0xEB3:
return Lao_AM;
1648 default:
return Lao_Norm;
1658 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
1675 pwOutChars[cWalk] = replacements[0];
1679 for (
i = 1;
i < 3 && replacements[
i] != 0x0000;
i++)
1682 for (
j = *pcChars;
j > cWalk;
j--)
1683 pwOutChars[
j] = pwOutChars[
j-1];
1684 *pcChars= *pcChars+1;
1685 pwOutChars[cWalk] = replacements[
i];
1695 for (cWalk = 0; cWalk < *pcChars; cWalk++)
1697 for (
i = 0; vowels[
i].
base != 0x0;
i++)
1699 if (pwOutChars[cWalk] == vowels[
i].
base)
1703 if (vowels[
i].
parts[1]) { cWalk++; o++; }
1704 if (vowels[
i].
parts[2]) { cWalk++; o++; }
1718 for (cWalk = 0; cWalk < *pcChars; cWalk += 2)
1720 for (
i = 0; consonants[
i].
output!= 0x0;
i++)
1723 for (
j = 0;
j + cWalk < *pcChars && consonants[
i].
parts[
j]!=0x0;
j++)
1724 if (pwOutChars[cWalk+
j] != consonants[
i].
parts[
j])
1727 if (consonants[
i].
parts[
j]==0x0)
1731 pwOutChars[cWalk] = consonants[
i].
output;
1732 for(
k = cWalk+1;
k < *pcChars -
j;
k++)
1733 pwOutChars[
k] = pwOutChars[
k+
j];
1734 *pcChars = *pcChars -
j;
1735 for (
k =
j ;
k > 0;
k--)
1736 pwLogClust[cWalk +
k +
offset] = pwLogClust[cWalk +
offset];
1751 WORD Ra = pwChar[
s->start];
1752 WORD H = pwChar[
s->start+1];
1754 TRACE(
"Doing reorder of Ra to %i\n",
s->base);
1755 for (
j =
s->start; j < s->
base-1;
j++)
1756 pwChar[
j] = pwChar[
j+2];
1757 pwChar[
s->base-1] = Ra;
1758 pwChar[
s->base] =
H;
1760 s->ralf =
s->base-1;
1770 int stop = (
s->blwf >=0)?
s->blwf+1 :
s->base;
1771 WORD Ra = pwChar[
s->start];
1772 WORD H = pwChar[
s->start+1];
1773 for (loc =
s->end; loc > stop; loc--)
1777 TRACE(
"Doing reorder of Ra to %i\n",loc);
1778 for (
j =
s->start;
j < loc-1;
j++)
1779 pwChar[
j] = pwChar[
j+2];
1785 if (
s->blwf >= 0)
s->blwf -= 2;
1786 if (
s->pref >= 0)
s->pref -= 2;
1795 WORD Ra = pwChar[
s->start];
1796 WORD H = pwChar[
s->start+1];
1798 TRACE(
"Doing reorder of Ra to %i\n",
s->end-1);
1799 for (
j =
s->start; j < s->
end-1;
j++)
1800 pwChar[
j] = pwChar[
j+2];
1801 pwChar[
s->end-1] = Ra;
1806 if (
s->blwf >= 0)
s->blwf -= 2;
1807 if (
s->pref >= 0)
s->pref -= 2;
1816 if (
s->end >
s->base)
1818 for (
i = 1;
i <=
s->end-
s->base;
i++)
1824 TRACE(
"Doing reorder of %x %x\n",
c,pwChar[
s->base]);
1825 for (
j =
s->base+
i;
j >
s->base;
j--)
1826 pwChar[
j] = pwChar[
j-1];
1827 pwChar[
s->base] =
c;
1829 if (
s->ralf >=
s->base)
s->ralf++;
1830 if (
s->blwf >=
s->base)
s->blwf++;
1831 if (
s->pref >=
s->base)
s->pref++;
1843 if (
s->end >
s->base)
1845 for (
i = 1;
i <=
s->end-
s->base;
i++)
1851 TRACE(
"Doing reorder of %x to %i\n",
c,
s->start);
1852 for (
j =
s->base+
i;
j >
s->start;
j--)
1853 pwChar[
j] = pwChar[
j-1];
1854 pwChar[
s->start] =
c;
1856 if (
s->ralf >= 0)
s->ralf++;
1857 if (
s->blwf >= 0)
s->blwf++;
1858 if (
s->pref >= 0)
s->pref++;
1868 if (
s->blwf >= 0 &&
g->blwf >
g->base)
1872 for (loc =
s->end; loc >
s->blwf; loc--)
1877 g_offset = (loc -
s->blwf) - 1;
1881 WORD blwf = glyphs[
g->blwf];
1882 TRACE(
"Doing reorder of Below-base to %i (glyph offset %i)\n",loc,g_offset);
1884 for (
j = 0;
j < g_offset;
j++)
1885 glyphs[
g->blwf +
j] = glyphs[
g->blwf +
j + 1];
1886 glyphs[
g->blwf + g_offset] = blwf;
1897 for (
i =
s->start; i < s->
base;
i++)
1902 int g_start =
g->start +
i -
s->start;
1903 if (g_start < g->
base -1 )
1905 WCHAR og = glyphs[g_start];
1906 TRACE(
"Doing reorder of matra from %i to %i\n",g_start,
g->base);
1907 for (
j = g_start;
j <
g->base-1;
j++)
1908 glyphs[
j] = glyphs[
j+1];
1909 glyphs[
g->base-1] = og;
1918 if (
s->pref >= 0 &&
g->pref >
g->base)
1921 WCHAR og = glyphs[
g->pref];
1922 TRACE(
"Doing reorder of pref from %i to %i\n",
g->pref,
g->base);
1923 for (
j =
g->pref;
j >
g->base;
j--)
1924 glyphs[
j] = glyphs[
j-1];
1925 glyphs[
g->base] = og;
1931 TRACE(
"Syllable (%i..%i..%i)\n",
s->start,
s->base,
s->end);
1932 if (
s->start ==
s->base &&
s->base ==
s->end)
return;
1933 if (lexical(pwChar[
s->base]) ==
lex_Vowel)
return;
1941 TRACE(
"Syllable (%i..%i..%i)\n",
s->start,
s->base,
s->end);
1942 if (
s->start ==
s->base &&
s->base ==
s->end)
return;
1943 if (lexical(pwChar[
s->base]) ==
lex_Vowel)
return;
1951 TRACE(
"Syllable (%i..%i..%i)\n",
s->start,
s->base,
s->end);
1952 if (
s->start ==
s->base &&
s->base ==
s->end)
return;
1953 if (lexical(pwChar[
s->base]) ==
lex_Vowel)
return;
1961 TRACE(
"Syllable (%i..%i..%i)\n",
s->start,
s->base,
s->end);
1962 if (
s->start ==
s->base &&
s->base ==
s->end)
return;
1963 if (lexical(pwChar[
s->base]) ==
lex_Vowel)
return;
1972 TRACE(
"Syllable (%i..%i..%i)\n",
s->start,
s->base,
s->end);
1973 TRACE(
"Glyphs (%i..%i..%i)\n",
g->start,
g->base,
g->end);
1974 if (
s->start ==
s->base &&
s->base ==
s->end)
return;
1975 if (lexical(chars[
s->base]) ==
lex_Vowel)
return;
1983 TRACE(
"Syllable (%i..%i..%i)\n",
s->start,
s->base,
s->end);
1984 TRACE(
"Glyphs (%i..%i..%i)\n",
g->start,
g->base,
g->end);
1985 if (
s->start ==
s->base &&
s->base ==
s->end)
return;
1986 if (lexical(chars[
s->base]) ==
lex_Vowel)
return;
2012static void Apply_Indic_BasicForm(
HDC hdc,
ScriptCache *psc,
SCRIPT_ANALYSIS *psa,
WCHAR* pwChars,
INT cChars,
IndicSyllable *syllable,
WORD *pwOutGlyphs,
INT* pcGlyphs,
WORD *pwLogClust,
lexical_function lexical,
IndicSyllable *glyph_index,
LoadedFeature *
feature )
2019 while(index <= glyph_index->
end)
2022 INT prevCount = *pcGlyphs;
2046static void Apply_Indic_PreBase(
HDC hdc,
ScriptCache *psc,
SCRIPT_ANALYSIS *psa,
WCHAR* pwChars,
INT cChars,
IndicSyllable *syllable,
WORD *pwOutGlyphs,
INT* pcGlyphs,
WORD *pwLogClust,
lexical_function lexical,
IndicSyllable *glyph_index,
const char*
feature)
2057 INT prevCount = *pcGlyphs;
2063 g_offset += (*pcGlyphs - prevCount);
2071static void Apply_Indic_Rphf(
HDC hdc,
ScriptCache *psc,
SCRIPT_ANALYSIS *psa,
WCHAR* pwChars,
INT cChars,
IndicSyllable *syllable,
WORD *pwOutGlyphs,
INT* pcGlyphs,
WORD *pwLogClust,
lexical_function lexical,
IndicSyllable *glyph_index)
2074 INT prevCount = *pcGlyphs;
2076 if (syllable->
ralf >= 0)
2100static void Apply_Indic_PostBase(
HDC hdc,
ScriptCache *psc,
SCRIPT_ANALYSIS *psa,
WCHAR* pwChars,
INT cChars,
IndicSyllable *syllable,
WORD *pwOutGlyphs,
INT* pcGlyphs,
WORD *pwLogClust,
lexical_function lexical,
IndicSyllable *glyph_index,
BOOL modern,
const char* feat)
2112 INT prevCount = *pcGlyphs;
2113 if (ralf >=0 && ralf <
index)
2122 pwOutGlyphs[
index+glyph_index->
base+g_offset] = pwOutGlyphs[
index+glyph_index->
base+g_offset+1];
2123 pwOutGlyphs[
index+glyph_index->
base+g_offset+1] =
g;
2131 g_offset += (*pcGlyphs - prevCount);
2136 pwOutGlyphs[
index+glyph_index->
base+g_offset] = pwOutGlyphs[
index+glyph_index->
base+g_offset+1];
2137 pwOutGlyphs[
index+glyph_index->
base+g_offset+1] =
g;
2145static void ShapeIndicSyllables(
HDC hdc,
ScriptCache *psc,
SCRIPT_ANALYSIS *psa,
WCHAR* pwChars,
INT cChars,
IndicSyllable *syllables,
INT syllable_count,
WORD *pwOutGlyphs,
INT* pcGlyphs,
WORD *pwLogClust,
lexical_function lexical,
second_reorder_function second_reorder,
BOOL modern)
2148 int overall_shift = 0;
2162 for (
c = 0;
c < syllable_count;
c++)
2167 old_end = glyph_indices.
end;
2171 TRACE(
"applying feature locl\n");
2172 Apply_Indic_BasicForm(
hdc, psc, psa, pwChars,
cChars, &syllables[
c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, locl);
2176 TRACE(
"applying feature nukt\n");
2177 Apply_Indic_BasicForm(
hdc, psc, psa, pwChars,
cChars, &syllables[
c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, nukt);
2181 TRACE(
"applying feature akhn\n");
2182 Apply_Indic_BasicForm(
hdc, psc, psa, pwChars,
cChars, &syllables[
c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, akhn);
2186 Apply_Indic_Rphf(
hdc, psc, psa, pwChars,
cChars, &syllables[
c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices);
2189 TRACE(
"applying feature rkrf\n");
2190 Apply_Indic_BasicForm(
hdc, psc, psa, pwChars,
cChars, &syllables[
c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, rkrf);
2193 Apply_Indic_PostBase(
hdc, psc, psa, pwChars,
cChars, &syllables[
c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, modern,
"pref");
2197 Apply_Indic_PreBase(
hdc, psc, psa, pwChars,
cChars, &syllables[
c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices,
"blwf");
2199 Apply_Indic_PostBase(
hdc, psc, psa, pwChars,
cChars, &syllables[
c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, modern,
"blwf");
2203 Apply_Indic_PreBase(
hdc, psc, psa, pwChars,
cChars, &syllables[
c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices,
"half");
2206 TRACE(
"applying feature pstf\n");
2207 Apply_Indic_BasicForm(
hdc, psc, psa, pwChars,
cChars, &syllables[
c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, pstf);
2211 TRACE(
"applying feature vatu\n");
2212 Apply_Indic_BasicForm(
hdc, psc, psa, pwChars,
cChars, &syllables[
c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, vatu);
2216 TRACE(
"applying feature cjct\n");
2217 Apply_Indic_BasicForm(
hdc, psc, psa, pwChars,
cChars, &syllables[
c], pwOutGlyphs, pcGlyphs, pwLogClust, lexical, &glyph_indices, cjct);
2221 second_reorder(pwChars, &syllables[
c], pwOutGlyphs, &glyph_indices, lexical);
2223 overall_shift += glyph_indices.
end - old_end;
2278 case 0x0015:
return lex_Ra;
2296 {0x0DDA, {0x0DD9,0x0DDA,0x0}},
2297 {0x0DDC, {0x0DD9,0x0DDC,0x0}},
2298 {0x0DDD, {0x0DD9,0x0DDD,0x0}},
2299 {0x0DDE, {0x0DD9,0x0DDE,0x0}},
2300 {0x0000, {0x0000,0x0000,0x0}}};
2308 int syllable_count = 0;
2312 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
2330 for (
i = 0;
i < cCount;
i++)
2333 (
i == 0 ||
input[
i-1] == 0x0020 ||
i == cCount-1 ||
input[
i+1] == 0x0020))
2340 ShapeIndicSyllables(
hdc, psc, psa,
input,
cChars, syllables, syllable_count, pwOutGlyphs, pcGlyphs, pwLogClust,
sinhala_lex,
NULL,
TRUE);
2351 case 0x0930:
return lex_Ra;
2358 {{0x0928, 0x093C, 0x00000}, 0x0929},
2359 {{0x0930, 0x093C, 0x00000}, 0x0931},
2360 {{0x0933, 0x093C, 0x00000}, 0x0934},
2361 {{0x0915, 0x093C, 0x00000}, 0x0958},
2362 {{0x0916, 0x093C, 0x00000}, 0x0959},
2363 {{0x0917, 0x093C, 0x00000}, 0x095A},
2364 {{0x091C, 0x093C, 0x00000}, 0x095B},
2365 {{0x0921, 0x093C, 0x00000}, 0x095C},
2366 {{0x0922, 0x093C, 0x00000}, 0x095D},
2367 {{0x092B, 0x093C, 0x00000}, 0x095E},
2368 {{0x092F, 0x093C, 0x00000}, 0x095F},
2369 {{0x0000, 0x0000, 0x00000}, 0x0000}};
2376 int syllable_count = 0;
2381 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
2399 ShapeIndicSyllables(
hdc, psc, psa,
input,
cChars, syllables, syllable_count, pwOutGlyphs, pcGlyphs, pwLogClust,
devanagari_lex,
NULL, modern);
2410 case 0x09B0:
return lex_Ra;
2417 {0x09CB, {0x09C7,0x09BE,0x0000}},
2418 {0x09CC, {0x09C7,0x09D7,0x0000}},
2419 {0x0000, {0x0000,0x0000,0x0000}}};
2422 {{0x09A4,0x09CD,0x200D}, 0x09CE},
2423 {{0x09A1,0x09BC,0x0000}, 0x09DC},
2424 {{0x09A2,0x09BC,0x0000}, 0x09DD},
2425 {{0x09AF,0x09BC,0x0000}, 0x09DF},
2426 {{0x0000,0x0000,0x0000}, 0x0000}};
2433 int syllable_count = 0;
2438 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
2457 for (cCount = cCount - 1 ; cCount >= 0; cCount --)
2459 if (cCount == 0 ||
input[cCount] == 0x0020)
2470 ShapeIndicSyllables(
hdc, psc, psa,
input,
cChars, syllables, syllable_count, pwOutGlyphs, pcGlyphs, pwLogClust,
bengali_lex,
NULL, modern);
2486 {{0x0A32,0x0A3C,0x0000}, 0x0A33},
2487 {{0x0A16,0x0A3C,0x0000}, 0x0A59},
2488 {{0x0A17,0x0A3C,0x0000}, 0x0A5A},
2489 {{0x0A1C,0x0A3C,0x0000}, 0x0A5B},
2490 {{0x0A2B,0x0A3C,0x0000}, 0x0A5E},
2491 {{0x0000,0x0000,0x0000}, 0x0000}};
2498 int syllable_count = 0;
2503 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
2521 ShapeIndicSyllables(
hdc, psc, psa,
input,
cChars, syllables, syllable_count, pwOutGlyphs, pcGlyphs, pwLogClust,
gurmukhi_lex,
NULL, modern);
2532 case 0x0AB0:
return lex_Ra;
2543 int syllable_count = 0;
2548 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
2562 ShapeIndicSyllables(
hdc, psc, psa,
input,
cChars, syllables, syllable_count, pwOutGlyphs, pcGlyphs, pwLogClust,
gujarati_lex,
NULL, modern);
2573 case 0x0B30:
return lex_Ra;
2580 {0x0B48, {0x0B47,0x0B56,0x0000}},
2581 {0x0B4B, {0x0B47,0x0B3E,0x0000}},
2582 {0x0B4C, {0x0B47,0x0B57,0x0000}},
2583 {0x0000, {0x0000,0x0000,0x0000}}};
2586 {{0x0B21,0x0B3C,0x0000}, 0x0B5C},
2587 {{0x0B22,0x0B3C,0x0000}, 0x0B5D},
2588 {{0x0000,0x0000,0x0000}, 0x0000}};
2595 int syllable_count = 0;
2600 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
2619 ShapeIndicSyllables(
hdc, psc, psa,
input,
cChars, syllables, syllable_count, pwOutGlyphs, pcGlyphs, pwLogClust,
oriya_lex,
NULL, modern);
2632 {0x0BCA, {0x0BC6,0x0BBE,0x0000}},
2633 {0x0BCB, {0x0BC7,0x0BBE,0x0000}},
2634 {0x0BCB, {0x0BC6,0x0BD7,0x0000}},
2635 {0x0000, {0x0000,0x0000,0x0000}}};
2638 {{0x0B92,0x0BD7,0x0000}, 0x0B94},
2639 {{0x0000,0x0000,0x0000}, 0x0000}};
2646 int syllable_count = 0;
2651 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
2670 ShapeIndicSyllables(
hdc, psc, psa,
input,
cChars, syllables, syllable_count, pwOutGlyphs, pcGlyphs, pwLogClust,
tamil_lex,
SecondReorder_Like_Tamil, modern);
2689 {0x0C48, {0x0C46,0x0C56,0x0000}},
2690 {0x0000, {0x0000,0x0000,0x0000}}};
2697 int syllable_count = 0;
2702 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
2720 ShapeIndicSyllables(
hdc, psc, psa,
input,
cChars, syllables, syllable_count, pwOutGlyphs, pcGlyphs, pwLogClust,
telugu_lex,
SecondReorder_Like_Telugu, modern);
2731 case 0x0CB0:
return lex_Ra;
2738 {0x0CC0, {0x0CBF,0x0CD5,0x0000}},
2739 {0x0CC7, {0x0CC6,0x0CD5,0x0000}},
2740 {0x0CC8, {0x0CC6,0x0CD6,0x0000}},
2741 {0x0CCA, {0x0CC6,0x0CC2,0x0000}},
2742 {0x0CCB, {0x0CC6,0x0CC2,0x0CD5}},
2743 {0x0000, {0x0000,0x0000,0x0000}}};
2750 int syllable_count = 0;
2755 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
2773 ShapeIndicSyllables(
hdc, psc, psa,
input,
cChars, syllables, syllable_count, pwOutGlyphs, pcGlyphs, pwLogClust,
kannada_lex,
SecondReorder_Like_Telugu, modern);
2786 {0x0D4A, {0x0D46,0x0D3E,0x0000}},
2787 {0x0D4B, {0x0D47,0x0D3E,0x0000}},
2788 {0x0D4C, {0x0D46,0x0D57,0x0000}},
2789 {0x0000, {0x0000,0x0000,0x0000}}};
2796 int syllable_count = 0;
2801 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
2819 ShapeIndicSyllables(
hdc, psc, psa,
input,
cChars, syllables, syllable_count, pwOutGlyphs, pcGlyphs, pwLogClust,
malayalam_lex,
SecondReorder_Like_Tamil, modern);
2836 int syllable_count = 0;
2840 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
2854 ShapeIndicSyllables(
hdc, psc, psa,
input,
cChars, syllables, syllable_count, pwOutGlyphs, pcGlyphs, pwLogClust,
khmer_lex,
NULL,
FALSE);
2863 return ((chr == 0x0020) || (chr == 0x200C) || (chr == 0x202F) || (chr == 0x180E) || (chr == 0x1800) || (chr == 0x1802) || (chr == 0x1803) || (chr == 0x1805) || (chr == 0x1808) || (chr == 0x1809) || (chr == 0x1807));
2876 ERR(
"Number of Glyphs and Chars need to match at the beginning\n");
2888 context_shape =
malloc(
cChars *
sizeof(*context_shape));
2895 context_shape[
i] =
Xn;
2897 context_shape[
i] =
Xl;
2902 context_shape[
i] =
Xr;
2904 context_shape[
i] =
Xm;
2910 char_index = glyph_index = 0;
2912 char_index = glyph_index =
cChars-1;
2914 while(char_index < cChars && char_index >= 0)
2917 INT prevCount = *pcGlyphs;
2923 glyph_index = nextIndex;
2929 glyph_index += dirL;
2933 free(context_shape);
2949 for (;
k <
cChars && pwLogClust[
k] ==
i;
k++)
2950 char_index[char_count++] =
k;
2953 if (char_count == 0)
2956 if (char_count ==1 && pwcChars[char_index[0]] == 0x0020)
2976 if (pGlyphProp[
i].sva.fZeroWidth)
2999 int initGlyph, finaGlyph;
3023 if (pwLogClust[
k] ==
i)
3025 if (pwcChars[
k] == 0x0020)
3034 BOOL isInit, isFinal;
3039 for (;
k <
cChars && pwLogClust[
k] ==
i;
k++)
3040 char_index[char_count++] =
k;
3043 isInit = (
i == initGlyph || (
i+dirR > 0 &&
i+dirR <
cGlyphs && spaces[
i+dirR]));
3044 isFinal = (
i == finaGlyph || (
i+dirL > 0 &&
i+dirL <
cGlyphs && spaces[
i+dirL]));
3046 if (char_count == 0)
3049 if (char_count == 1)
3051 if (pwcChars[char_index[0]] == 0x0020)
3056 else if (pwcChars[char_index[0]] == 0x0640)
3058 else if (pwcChars[char_index[0]] == 0x0633)
3060 if (!isInit && !isFinal)
3069 if (pwcChars[char_index[0]] == 0x0628 )
3071 else if (pwcChars[char_index[0]] == 0x0631 )
3073 else if (pwcChars[char_index[0]] == 0x0647 )
3075 else if ((pwcChars[char_index[0]] == 0x0627 || pwcChars[char_index[0]] == 0x0625 || pwcChars[char_index[0]] == 0x0623 || pwcChars[char_index[0]] == 0x0622) )
3080 else if (!isInit && !isFinal)
3085 else if (char_count == 2)
3087 if ((pwcChars[char_index[0]] == 0x0628 && pwcChars[char_index[1]]== 0x0631) || (pwcChars[char_index[0]] == 0x0631 && pwcChars[char_index[1]]== 0x0628))
3094 else if (!isInit && !isFinal)
3117 for (;
k <
cChars && pwLogClust[
k] ==
i;
k++)
3118 char_index[char_count++] =
k;
3121 if (char_count == 0)
3126 if (char_count ==1 && pwcChars[char_index[0]] == 0x0020)
3163 for (;
k <
cChars && pwLogClust[
k] ==
i;
k++)
3164 char_index[char_count++] =
k;
3172 if (char_count == 0)
3175 if (char_count ==1 && pwcChars[char_index[0]] == 0x0020)
3179 if (char_count == 1 && pwcChars[char_index[0]] == 0x0e33)
3188 if (!pGlyphProp[
i].sva.fClusterStart)
3205 for (;
k <
cChars && pwLogClust[
k] ==
i;
k++)
3206 char_index[char_count++] =
k;
3209 if (char_count == 0)
3212 if (char_count ==1 && pwcChars[char_index[0]] == 0x0020)
3236 for (;
k <
cChars && pwLogClust[
k] ==
i;
k++)
3237 char_index[char_count++] =
k;
3240 if (char_count == 0)
3243 if (char_count ==1 && pwcChars[char_index[0]] == 0x0020)
3257 if (!pGlyphProp[
i].sva.fClusterStart)
3265static void ShapeCharGlyphProp_BaseIndic(
HDC hdc,
ScriptCache *psc,
SCRIPT_ANALYSIS *psa,
const WCHAR* pwcChars,
const INT cChars,
const WORD* pwGlyphs,
const INT cGlyphs,
WORD *pwLogClust,
SCRIPT_CHARPROP *pCharProp,
SCRIPT_GLYPHPROP *pGlyphProp,
lexical_function lexical,
BOOL use_syllables,
BOOL override_gsub)
3278 for (;
k <
cChars && pwLogClust[
k] ==
i;
k++)
3279 char_index[char_count++] =
k;
3289 if (char_count == 0)
3295 if (char_count ==1 && pwcChars[char_index[0]] == 0x0020)
3305 switch (lexical(pwcChars[char_index[
k]]))
3317 if (pwcChars[char_index[
k]-1] == 0x0020 || pwcChars[char_index[
k]+1] == 0x0020)
3331 int syllable_count = 0;
3336 for (
i = 0;
i < syllable_count;
i++)
3340 for (
j = syllables[
i].
start+1;
j <= syllables[
i].end;
j++)
3342 if (pwLogClust[
j] !=
g)
3358 ShapeCharGlyphProp_BaseIndic(
hdc, psc, psa, pwcChars,
cChars, pwGlyphs,
cGlyphs, pwLogClust, pCharProp, pGlyphProp,
sinhala_lex,
FALSE,
FALSE);
3363 ShapeCharGlyphProp_BaseIndic(
hdc, psc, psa, pwcChars,
cChars, pwGlyphs,
cGlyphs, pwLogClust, pCharProp, pGlyphProp,
devanagari_lex,
TRUE,
TRUE);
3368 ShapeCharGlyphProp_BaseIndic(
hdc, psc, psa, pwcChars,
cChars, pwGlyphs,
cGlyphs, pwLogClust, pCharProp, pGlyphProp,
bengali_lex,
TRUE,
TRUE);
3373 ShapeCharGlyphProp_BaseIndic(
hdc, psc, psa, pwcChars,
cChars, pwGlyphs,
cGlyphs, pwLogClust, pCharProp, pGlyphProp,
gurmukhi_lex,
TRUE,
TRUE);
3378 ShapeCharGlyphProp_BaseIndic(
hdc, psc, psa, pwcChars,
cChars, pwGlyphs,
cGlyphs, pwLogClust, pCharProp, pGlyphProp,
gujarati_lex,
TRUE,
TRUE);
3383 ShapeCharGlyphProp_BaseIndic(
hdc, psc, psa, pwcChars,
cChars, pwGlyphs,
cGlyphs, pwLogClust, pCharProp, pGlyphProp,
oriya_lex,
TRUE,
TRUE);
3388 ShapeCharGlyphProp_BaseIndic(
hdc, psc, psa, pwcChars,
cChars, pwGlyphs,
cGlyphs, pwLogClust, pCharProp, pGlyphProp,
tamil_lex,
TRUE,
TRUE);
3393 ShapeCharGlyphProp_BaseIndic(
hdc, psc, psa, pwcChars,
cChars, pwGlyphs,
cGlyphs, pwLogClust, pCharProp, pGlyphProp,
telugu_lex,
TRUE,
TRUE);
3398 ShapeCharGlyphProp_BaseIndic(
hdc, psc, psa, pwcChars,
cChars, pwGlyphs,
cGlyphs, pwLogClust, pCharProp, pGlyphProp,
kannada_lex,
TRUE,
TRUE);
3403 ShapeCharGlyphProp_BaseIndic(
hdc, psc, psa, pwcChars,
cChars, pwGlyphs,
cGlyphs, pwLogClust, pCharProp, pGlyphProp,
malayalam_lex,
TRUE,
TRUE);
3408 ShapeCharGlyphProp_BaseIndic(
hdc, psc, psa, pwcChars,
cChars, pwGlyphs,
cGlyphs, pwLogClust, pCharProp, pGlyphProp,
khmer_lex,
TRUE,
TRUE);
3435 if (!rpRangeProperties)
3569 FIXME(
"Filtering not implemented\n");
std::map< E_STRING, PART_TEST > parts
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static __inline const char * debugstr_an(const char *s, int n)
#define MS_MAKE_TAG(ch0, ch1, ch2, ch3)
int USP10_FindGlyphInLogClust(const WORD *pwLogClust, int cChars, WORD target)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static const uint32_t k[]
static unsigned short get_table_entry_16(const unsigned short *table, WCHAR ch)
@ SCRIPT_JUSTIFY_ARABIC_RA
@ SCRIPT_JUSTIFY_ARABIC_HA
@ SCRIPT_JUSTIFY_ARABIC_SEEN
@ SCRIPT_JUSTIFY_ARABIC_BLANK
@ SCRIPT_JUSTIFY_ARABIC_NORMAL
@ SCRIPT_JUSTIFY_ARABIC_BA
@ SCRIPT_JUSTIFY_ARABIC_SEEN_M
@ SCRIPT_JUSTIFY_ARABIC_BARA
@ SCRIPT_JUSTIFY_CHARACTER
@ SCRIPT_JUSTIFY_ARABIC_ALEF
@ SCRIPT_JUSTIFY_ARABIC_KASHIDA
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLuint GLsizei GLsizei * length
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
void Indic_ReorderCharacters(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc, WCHAR *input, unsigned int cChar, IndicSyllable **syllables, int *syllable_count, lexical_function lex, reorder_function reorder_f, BOOL modern)
void Indic_ParseSyllables(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc, const WCHAR *input, unsigned int cChar, IndicSyllable **syllables, int *syllable_count, lexical_function lex, BOOL modern)
#define memcpy(s1, s2, n)
INTERNETFEATURELIST feature
for(i=0;i< sizeof(testsuite)/sizeof(testsuite[0]);++i) ok(call_test(testsuite[i].func)
SCRIPT_FONTPROPERTIES sfp
TEXTRANGE_PROPERTIES defaultGPOSTextRange
ShapeCharGlyphPropProc charGlyphPropProc
const char *const * requiredFeatures
ContextualShapingProc contextProc
TEXTRANGE_PROPERTIES defaultTextRange
#define USP_E_SCRIPT_NOT_IN_FONT
static BOOL is_consonant(int type)
#define FEATURE_GSUB_TABLE
#define FEATURE_GPOS_TABLE
int(* lexical_function)(WCHAR c)
#define FEATURE_ALL_TABLES
HRESULT OpenType_GetFontFeatureTags(ScriptCache *psc, OPENTYPE_TAG script_tag, OPENTYPE_TAG language_tag, BOOL filtered, OPENTYPE_TAG searchingFor, char tableType, int cMaxTags, OPENTYPE_TAG *pFeatureTags, int *pcTags, LoadedFeature **feature)
HRESULT OpenType_GetFontLanguageTags(ScriptCache *psc, OPENTYPE_TAG script_tag, OPENTYPE_TAG searchingFor, int cMaxTags, OPENTYPE_TAG *pLanguageTags, int *pcTags)
unsigned int OpenType_apply_GPOS_lookup(const ScriptCache *script_cache, const OUTLINETEXTMETRICW *otm, const LOGFONTW *logfont, const SCRIPT_ANALYSIS *analysis, int *advance, unsigned int lookup_index, const WORD *glyphs, unsigned int glyph_index, unsigned int glyph_count, GOFFSET *goffset)
void OpenType_GDEF_UpdateGlyphProps(ScriptCache *psc, const WORD *pwGlyphs, const WORD cGlyphs, WORD *pwLogClust, const WORD cChars, SCRIPT_GLYPHPROP *pGlyphProp)
int OpenType_apply_GSUB_lookup(const void *table, unsigned int lookup_index, WORD *glyphs, unsigned int glyph_index, int write_dir, int *glyph_count)
HRESULT OpenType_GetFontScriptTags(ScriptCache *psc, OPENTYPE_TAG searchingFor, int cMaxTags, OPENTYPE_TAG *pScriptTags, int *pcTags)
static void GPOS_apply_feature(const ScriptCache *psc, const OUTLINETEXTMETRICW *otm, const LOGFONTW *logfont, const SCRIPT_ANALYSIS *analysis, int *advance, const LoadedFeature *feature, const WORD *glyphs, int glyph_count, GOFFSET *goffset)
void SHAPE_ApplyDefaultOpentypeFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, INT cChars, WORD *pwLogClust)
static BOOL word_break_causing(WCHAR chr)
static const VowelComponents Malayalam_vowels[]
static int combining_lexical_Thai(WCHAR c)
static void Reorder_Ra_follows_base(WCHAR *pwChar, IndicSyllable *s, lexical_function lexical)
static INT find_halant_consonant(WCHAR *pwChars, INT index, INT end, lexical_function lexical)
static HRESULT ContextualShape_Thai(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static void ShapeCharGlyphProp_Control(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static void Apply_Indic_PreBase(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwChars, INT cChars, IndicSyllable *syllable, WORD *pwOutGlyphs, INT *pcGlyphs, WORD *pwLogClust, lexical_function lexical, IndicSyllable *glyph_index, const char *feature)
static int oriya_lex(WCHAR c)
static HRESULT ContextualShape_Sinhala(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static HRESULT ContextualShape_Thaana(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static void Reorder_Like_Bengali(WCHAR *pwChar, IndicSyllable *s, lexical_function lexical)
static void ShapeCharGlyphProp_Telugu(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static const VowelComponents Oriya_vowels[]
static const VowelComponents Tamil_vowels[]
static void ShapeCharGlyphProp_Oriya(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static OPENTYPE_FEATURE_RECORD ethiopic_features[]
static HRESULT ContextualShape_Phags_pa(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static void ShapeCharGlyphProp_BaseIndic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp, lexical_function lexical, BOOL use_syllables, BOOL override_gsub)
static void ShapeCharGlyphProp_Thai(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static int gurmukhi_lex(WCHAR c)
static const VowelComponents Sinhala_vowels[]
static const VowelComponents Telugu_vowels[]
static OPENTYPE_FEATURE_RECORD syriac_gpos_features[]
static void shift_syllable_glyph_indices(IndicSyllable *glyph_index, INT index, INT shift)
VOID(* ShapeCharGlyphPropProc)(HDC, ScriptCache *, SCRIPT_ANALYSIS *, const WCHAR *, const INT, const WORD *, const INT, WORD *, SCRIPT_CHARPROP *, SCRIPT_GLYPHPROP *)
static int combining_lexical_Lao(WCHAR c)
static HRESULT ContextualShape_Malayalam(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static OPENTYPE_FEATURE_RECORD arabic_features[]
static void Reorder_Like_Sinhala(WCHAR *pwChar, IndicSyllable *s, lexical_function lexical)
static void ShapeCharGlyphProp_Hebrew(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static VOID * load_gdef_table(HDC hdc)
static HRESULT ContextualShape_Tamil(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static int combining_lexical_Hebrew(WCHAR c)
static int GSUB_apply_feature_all_lookups(const void *header, LoadedFeature *feature, WORD *glyphs, unsigned int glyph_index, int write_dir, int *glyph_count)
static void ShapeCharGlyphProp_Tamil(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static void Reorder_Like_Kannada(WCHAR *pwChar, IndicSyllable *s, lexical_function lexical)
int SHAPE_does_GSUB_feature_apply_to_chars(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc, const WCHAR *chars, int write_dir, int count, const char *feature)
static const char *const required_tamil_features[]
static void ShapeCharGlyphProp_Sinhala(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static const char *const required_gurmukhi_features[]
static const ConsonantComponents Oriya_consonants[]
static HRESULT ContextualShape_Gurmukhi(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static void UpdateClustersFromGlyphProp(const int cGlyphs, const int cChars, WORD *pwLogClust, SCRIPT_GLYPHPROP *pGlyphProp)
static void SecondReorder_Like_Telugu(const WCHAR *chars, const IndicSyllable *s, WORD *glyphs, const IndicSyllable *g, lexical_function lexical)
static OPENTYPE_FEATURE_RECORD tibetan_gpos_features[]
static OPENTYPE_FEATURE_RECORD phags_features[]
static int devanagari_lex(WCHAR c)
static void SHAPE_ApplyOpenTypeFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, INT cChars, const TEXTRANGE_PROPERTIES *rpRangeProperties, WORD *pwLogClust)
static HRESULT ContextualShape_Gujarati(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static int telugu_lex(WCHAR c)
static void Reorder_Matra_precede_syllable(WCHAR *pwChar, IndicSyllable *s, lexical_function lexical)
static BOOL get_GSUB_Indic2(SCRIPT_ANALYSIS *psa, ScriptCache *psc)
static OPENTYPE_FEATURE_RECORD hebrew_features[]
static OPENTYPE_FEATURE_RECORD mongolian_features[]
HRESULT(* ContextualShapingProc)(HDC, ScriptCache *, SCRIPT_ANALYSIS *, WCHAR *, INT, WORD *, INT *, INT, WORD *)
static OPENTYPE_FEATURE_RECORD thai_gpos_features[]
static void Apply_Indic_PostBase(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwChars, INT cChars, IndicSyllable *syllable, WORD *pwOutGlyphs, INT *pcGlyphs, WORD *pwLogClust, lexical_function lexical, IndicSyllable *glyph_index, BOOL modern, const char *feat)
static WCHAR neighbour_char(int i, int delta, const WCHAR *chars, INT cchLen)
static int combining_lexical_Thaana(WCHAR c)
static HRESULT ContextualShape_Arabic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static const VowelComponents Bengali_vowels[]
static int malayalam_lex(WCHAR c)
static int tamil_lex(WCHAR c)
static int gujarati_lex(WCHAR c)
static void SecondReorder_Blwf_follows_matra(const WCHAR *chars, const IndicSyllable *s, WORD *glyphs, const IndicSyllable *g, lexical_function lexical)
static INT apply_GSUB_feature_to_glyph(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc, WORD *glyphs, INT index, INT write_dir, INT *glyph_count, const char *feat)
struct tagConsonantComponents ConsonantComponents
static void ShapeIndicSyllables(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwChars, INT cChars, IndicSyllable *syllables, INT syllable_count, WORD *pwOutGlyphs, INT *pcGlyphs, WORD *pwLogClust, lexical_function lexical, second_reorder_function second_reorder, BOOL modern)
static void ShapeCharGlyphProp_Tibet(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static const VowelComponents Kannada_vowels[]
static HRESULT insert_glyph(WORD *pwGlyphs, INT *pcGlyphs, INT cChars, INT write_dir, WORD glyph, INT index, WORD *pwLogClust, INT maxGlyphs)
static void Reorder_Ra_follows_syllable(WCHAR *pwChar, IndicSyllable *s, lexical_function lexical)
static int sinhala_lex(WCHAR c)
static VOID * load_gpos_table(HDC hdc)
HRESULT SHAPE_ContextualShaping(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
struct tagVowelComponents VowelComponents
static void SecondReorder_Pref_precede_base(const IndicSyllable *s, WORD *glyphs, const IndicSyllable *g, lexical_function lexical)
static int apply_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc, WORD *pwOutGlyphs, int write_dir, INT *pcGlyphs, INT cChars, const char *feat, WORD *pwLogClust)
#define phags_pa_CANDRABINDU
static OPENTYPE_FEATURE_RECORD thai_features[]
static HRESULT ContextualShape_Khmer(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
void SHAPE_ApplyOpenTypePositions(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WORD *pwGlyphs, INT cGlyphs, int *piAdvance, GOFFSET *pGoffset)
static void ShapeCharGlyphProp_Kannada(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
HRESULT SHAPE_CheckFontForRequiredFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa)
static void ShapeCharGlyphProp_Devanagari(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static HRESULT ContextualShape_Lao(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
const unsigned short indic_syllabic_table[]
HRESULT SHAPE_GetFontLanguageTags(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, int cMaxTags, OPENTYPE_TAG *pLangSysTags, int *pcTags)
static OPENTYPE_FEATURE_RECORD syriac_features[]
const unsigned short wine_shaping_forms[LAST_ARABIC_CHAR - FIRST_ARABIC_CHAR+1][4]
static const char *const required_telugu_features[]
static VOID * load_gsub_table(HDC hdc)
static const char *const required_syriac_features[]
static void DecomposeVowels(HDC hdc, WCHAR *pwOutChars, INT *pcChars, const VowelComponents vowels[], WORD *pwLogClust, INT cChars)
static const ConsonantComponents Tamil_consonants[]
static OPENTYPE_FEATURE_RECORD devanagari_gpos_features[]
static void Apply_Indic_BasicForm(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwChars, INT cChars, IndicSyllable *syllable, WORD *pwOutGlyphs, INT *pcGlyphs, WORD *pwLogClust, lexical_function lexical, IndicSyllable *glyph_index, LoadedFeature *feature)
static HRESULT ContextualShape_Kannada(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static void ShapeCharGlyphProp_Gurmukhi(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static OPENTYPE_FEATURE_RECORD khmer_gpos_features[]
static LoadedFeature * load_OT_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc, char tableType, const char *feat)
static BOOL mongolian_wordbreak(WCHAR chr)
static OPENTYPE_FEATURE_RECORD arabic_gpos_features[]
static void ReplaceInsertChars(HDC hdc, INT cWalk, INT *pcChars, WCHAR *pwOutChars, const WCHAR *replacements)
static const char *const required_khmer_features[]
static void ShapeCharGlyphProp_Arabic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static OPENTYPE_TAG get_opentype_script(HDC hdc, const SCRIPT_ANALYSIS *psa, const ScriptCache *script_cache, BOOL try_new)
static void SecondReorder_Matra_precede_base(const WCHAR *chars, const IndicSyllable *s, WORD *glyphs, const IndicSyllable *g, lexical_function lexical)
static const char *const required_bengali_features[]
static int combining_lexical_Arabic(WCHAR c)
static void Apply_Indic_Rphf(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwChars, INT cChars, IndicSyllable *syllable, WORD *pwOutGlyphs, INT *pcGlyphs, WORD *pwLogClust, lexical_function lexical, IndicSyllable *glyph_index)
static HRESULT ContextualShape_Devanagari(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static const char *const contextual_features[]
static int khmer_lex(WCHAR c)
static INT find_consonant_halant(WCHAR *pwChars, INT index, INT end, lexical_function lexical)
static void ShapeCharGlyphProp_Default(ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static HRESULT ContextualShape_Oriya(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static void UpdateClusters(int nextIndex, int changeCount, int write_dir, int chars, WORD *pwLogClust)
static const char *const required_arabic_features[]
static CHAR neighbour_joining_type(int i, int delta, const CHAR *context_type, INT cchLen, SCRIPT_ANALYSIS *psa)
static void Reorder_Ra_follows_matra(WCHAR *pwChar, IndicSyllable *s, lexical_function lexical)
void(* second_reorder_function)(const WCHAR *chars, const IndicSyllable *syllable, WORD *glyphs, const IndicSyllable *glyph_index, lexical_function lex)
struct ScriptShapeDataTag ScriptShapeData
int(* combining_lexical_function)(WCHAR c)
static const char *const required_devanagari_features[]
static void ShapeCharGlyphProp_Bengali(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static BOOL right_join_causing(CHAR joining_type)
static void ComposeConsonants(HDC hdc, WCHAR *pwOutChars, INT *pcChars, const ConsonantComponents consonants[], WORD *pwLogClust)
const unsigned short wine_shaping_table[]
static void ShapeCharGlyphProp_Malayalam(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static OPENTYPE_FEATURE_RECORD hebrew_gpos_features[]
static void ShapeCharGlyphProp_Gujarati(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
scriptData scriptInformation[]
static OPENTYPE_FEATURE_RECORD devanagari_features[]
static void ShapeCharGlyphProp_None(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static HRESULT mark_invalid_combinations(HDC hdc, const WCHAR *pwcChars, INT cChars, WORD *pwGlyphs, INT *pcGlyphs, INT write_dir, WORD *pwLogClust, INT maxGlyphs, combining_lexical_function lex)
static void ShapeCharGlyphProp_Latin(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
static OPENTYPE_FEATURE_RECORD sinhala_features[]
static void ShapeCharGlyphProp_Khmer(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR *pwcChars, const INT cChars, const WORD *pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)
HRESULT SHAPE_GetFontFeatureTags(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, OPENTYPE_TAG tagLangSys, int cMaxTags, OPENTYPE_TAG *pFeatureTags, int *pcTags)
static OPENTYPE_FEATURE_RECORD latin_gpos_features[]
static void Reorder_Matra_precede_base(WCHAR *pwChar, IndicSyllable *s, lexical_function lexical)
static HRESULT ContextualShape_Hebrew(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static HRESULT ContextualShape_Telugu(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
HRESULT SHAPE_GetFontScriptTags(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, int cMaxTags, OPENTYPE_TAG *pScriptTags, int *pcTags)
static int unicode_lex(WCHAR c)
static const ConsonantComponents Gurmukhi_consonants[]
static void Reorder_Like_Devanagari(WCHAR *pwChar, IndicSyllable *s, lexical_function lexical)
static OPENTYPE_FEATURE_RECORD khmer_features[]
static const char *const required_lao_features[]
static const ScriptShapeData ShapingData[]
static OPENTYPE_FEATURE_RECORD myanmar_features[]
#define FIRST_ARABIC_CHAR
static VOID load_ot_tables(HDC hdc, ScriptCache *psc)
static const ConsonantComponents Devanagari_consonants[]
static void SecondReorder_Like_Tamil(const WCHAR *chars, const IndicSyllable *s, WORD *glyphs, const IndicSyllable *g, lexical_function lexical)
static OPENTYPE_FEATURE_RECORD tibetan_features[]
static OPENTYPE_FEATURE_RECORD standard_features[]
static int combining_lexical_Syriac(WCHAR c)
static const ConsonantComponents Bengali_consonants[]
static HRESULT ContextualShape_Mongolian(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static const char *const required_oriya_features[]
static BOOL left_join_causing(CHAR joining_type)
static HRESULT ContextualShape_Control(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static int kannada_lex(WCHAR c)
static HRESULT ContextualShape_Bengali(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static OPENTYPE_FEATURE_RECORD latin_features[]
static HRESULT ContextualShape_Syriac(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR *pwcChars, INT cChars, WORD *pwOutGlyphs, INT *pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
static int bengali_lex(WCHAR c)
_In_ FONTOBJ _In_ ULONG _In_ ULONG cGlyphs
#define NtGdiGetTextCharsetInfo(A, B, C)
#define NtGdiGetGlyphIndicesW(A, B, C, D, E)
#define NtGdiGetFontData(A, B, C, D, E)
#define CHINESEBIG5_CHARSET
#define VIETNAMESE_CHARSET
#define EASTEUROPE_CHARSET