"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "swindow/SFontTTF.cpp" between
yudit-3.0.2.tar.gz and yudit-3.0.3.tar.gz

About: yudit is an Unicode plain-text editor that can do True Type font rendering, printing, transliterated keyboard input and handwriting recognition with no dependencies on external engines.

SFontTTF.cpp  (yudit-3.0.2):SFontTTF.cpp  (yudit-3.0.3)
skipping to change at line 1239 skipping to change at line 1239
getLigatureUnicode (lig, chars); getLigatureUnicode (lig, chars);
SS_GlyphIndex* gi = new SS_GlyphIndex [liglen]; SS_GlyphIndex* gi = new SS_GlyphIndex [liglen];
CHECK_NEW (gi); CHECK_NEW (gi);
unsigned int count = 0; unsigned int count = 0;
unsigned int i; unsigned int i;
SS_GlyphIndex fontZWJ = findGlyph (SD_CD_ZWJ, false); SS_GlyphIndex fontZWJ = findGlyph (SD_CD_ZWJ, false);
if (fontZWJ == 0) fontZWJ = SD_G_INDIC_ZWJ; if (fontZWJ == 0) fontZWJ = SD_G_INDIC_ZWJ;
for (i=0; i<liglen; i++) for (i=0; i<liglen; i++)
{ {
// We ha to fix getOTFLigature to take care of script direction. // We only deal with logical order ligatures.
// until that we recevese the array here, and reverse it back gi[count] = findGlyph (chars[i], false);
// on the output.
gi[count] = findGlyph (chars[liglen-i-1], false);
if (gi[count] == 0 && chars[i] == SD_CD_ZWJ) { if (gi[count] == 0 && chars[i] == SD_CD_ZWJ) {
gi[count] = SD_G_INDIC_ZWJ; gi[count] = SD_G_INDIC_ZWJ;
} }
if (gi[count] == 0) if (gi[count] == 0)
{ {
if (chars[i] != 0x200d) if (chars[i] != 0x200d)
{ {
SString chc; char2Glyphs.put (key, chc); SString chc; char2Glyphs.put (key, chc);
delete[] chars; delete[] chars;
delete[] gi; delete[] gi;
skipping to change at line 1291 skipping to change at line 1289
gi[0] = lig; gi[0] = lig;
// ligs fell out. // ligs fell out.
for(i=0; i<count-ligs; i++) gi[i+1] = gi[i+ligs]; for(i=0; i<count-ligs; i++) gi[i+1] = gi[i+ligs];
count = count-ligs+1; count = count-ligs+1;
ligs = getOTFLigature (0, "rlig,liga", &gi[0], count, &lig, 4); ligs = getOTFLigature (0, "rlig,liga", &gi[0], count, &lig, 4);
} }
for (i=0; i<count; i++) { for (i=0; i<count; i++) {
if (gi[i] != fontZWJ) if (gi[i] != fontZWJ)
{ {
// we reverse back what we reversed at the beginning. out->append (gi[i]);
out->insert (0, gi[i]);
} }
} }
SString chc ((char*)out->array(), out->size() * sizeof (SS_GlyphIndex)); SString chc ((char*)out->array(), out->size() * sizeof (SS_GlyphIndex));
char2Glyphs.put (key, chc); char2Glyphs.put (key, chc);
delete[] chars; delete[] chars;
delete[] gi; delete[] gi;
return true; return true;
} }
else if (scriptcode == SD_COMBINING_LIGATURE) else if (scriptcode == SD_COMBINING_LIGATURE)
 End of changes. 2 change blocks. 
6 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)