Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c

    r2 r561  
    487487     for (int i = 0; i < len; ++i)
    488488         qDebug("arabic properties(%d): uc=%x shape=%d, justification=%d", i, chars[i], properties[i].shape, properties[i].justification);
     489    */
     490}
     491
     492static Joining getNkoJoining(unsigned short uc)
     493{
     494    if (uc < 0x7ca)
     495        return JNone;
     496    if (uc <= 0x7ea)
     497        return JDual;
     498    if (uc <= 0x7f3)
     499        return JTransparent;
     500    if (uc <= 0x7f9)
     501        return JNone;
     502    if (uc == 0x7fa)
     503        return JCausing;
     504    return JNone;
     505}
     506
     507static void getNkoProperties(const unsigned short *chars, int len, HB_ArabicProperties *properties)
     508{
     509    int lastPos = 0;
     510    int i = 0;
     511
     512    Joining j = getNkoJoining(chars[0]);
     513    ArabicShape shape = joining_table[XIsolated][j].form2;
     514    properties[0].justification = HB_NoJustification;
     515
     516    for (i = 1; i < len; ++i) {
     517        properties[i].justification = (HB_GetUnicodeCharCategory(chars[i]) == HB_Separator_Space) ?
     518                                      ArabicSpace : ArabicNone;
     519
     520        j = getNkoJoining(chars[i]);
     521
     522        if (j == JTransparent) {
     523            properties[i].shape = XIsolated;
     524            continue;
     525        }
     526
     527        properties[lastPos].shape = joining_table[shape][j].form1;
     528        shape = joining_table[shape][j].form2;
     529
     530
     531        lastPos = i;
     532    }
     533    properties[lastPos].shape = joining_table[shape][JNone].form1;
     534
     535
     536    /*
     537     for (int i = 0; i < len; ++i)
     538         qDebug("nko properties(%d): uc=%x shape=%d, justification=%d", i, chars[i], properties[i].shape, properties[i].justification);
    489539    */
    490540}
     
    10101060        ++properties;
    10111061    }
    1012     if (f + l < item->stringLength) {
     1062    if (f + l + item->item.pos < item->stringLength) {
    10131063        ++l;
    10141064    }
    1015     getArabicProperties(uc+f, l, props);
     1065    if (item->item.script == HB_Script_Nko)
     1066        getNkoProperties(uc+f, l, props);
     1067    else
     1068        getArabicProperties(uc+f, l, props);
    10161069
    10171070    for (i = 0; i < (int)item->num_glyphs; i++) {
     
    10521105    HB_STACKARRAY(HB_UChar16, shapedChars, item->item.length);
    10531106
    1054     assert(item->item.script == HB_Script_Arabic || item->item.script == HB_Script_Syriac);
     1107    assert(item->item.script == HB_Script_Arabic || item->item.script == HB_Script_Syriac
     1108           || item->item.script == HB_Script_Nko);
    10551109
    10561110#ifndef NO_OPENTYPE
     
    10661120#endif
    10671121
    1068     if (item->item.script == HB_Script_Syriac)
     1122    if (item->item.script != HB_Script_Arabic)
    10691123        return HB_BasicShape(item);
    10701124
  • trunk/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c

    r2 r561  
    20602060  HB_Anchor      *bans;
    20612061
    2062   HB_UNUSED(num_classes);
    2063 
    20642062  if ( ba->BaseRecord )
    20652063  {
     
    20682066    if ( ba->BaseCount )
    20692067    {
     2068      HB_UShort i, count;
     2069      count = num_classes * ba->BaseCount;
    20702070      bans = br[0].BaseAnchor;
     2071      for (i = 0; i < count; i++)
     2072        Free_Anchor (&bans[i]);
    20712073      FREE( bans );
    20722074    }
     
    27242726  HB_Error  error;
    27252727
    2726   HB_UShort        k, m, n, count;
     2728  HB_UShort        m, n, count;
    27272729  HB_UInt          cur_offset, new_offset, base_offset;
    27282730
  • trunk/src/3rdparty/harfbuzz/src/harfbuzz-hebrew.c

    r2 r561  
    6363        if (!HB_ConvertStringToGlyphIndices(shaper_item))
    6464            return FALSE;
    65 
    6665
    6766        HB_HeuristicSetGlyphAttributes(shaper_item);
  • trunk/src/3rdparty/harfbuzz/src/harfbuzz-impl.c

    r2 r561  
    3434          HB_Error  *perror )
    3535{
    36   HB_Error    error = 0;
     36  HB_Error    error = (HB_Error)0;
    3737  HB_Pointer  block = NULL;
    3838
     
    5555{
    5656    HB_Pointer  block2 = NULL;
    57     HB_Error    error  = 0;
     57    HB_Error    error  = (HB_Error)0;
    5858
    5959    block2 = realloc( block, new_size );
  • trunk/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp

    r2 r561  
    420420
    421421    Invalid, Invalid, Invalid, Invalid,
    422     Invalid, Invalid, Invalid, LengthMark,
     422    Invalid, Invalid, Invalid, Matra,
    423423    Invalid, Invalid, Invalid, Invalid,
    424424    Invalid, Invalid, Invalid, Invalid,
     
    567567    None, None, None, None,
    568568
    569     None, None, None, None,
     569    Below, None, None, None,
    570570    None, None, None, None,
    571571    None, None, None, None,
     
    10511051// vowel matras that have to be split into two parts.
    10521052static const unsigned short split_matras[]  = {
    1053     //  matra, split1, split2
     1053    //  matra, split1, split2, split3
    10541054
    10551055    // bengalis
    1056     0x9cb, 0x9c7, 0x9be,
    1057     0x9cc, 0x9c7, 0x9d7,
     1056    0x9cb, 0x9c7, 0x9be, 0x0,
     1057    0x9cc, 0x9c7, 0x9d7, 0x0,
    10581058    // oriya
    1059     0xb48, 0xb47, 0xb56,
    1060     0xb4b, 0xb47, 0xb3e,
    1061     0xb4c, 0xb47, 0xb57,
     1059    0xb48, 0xb47, 0xb56, 0x0,
     1060    0xb4b, 0xb47, 0xb3e, 0x0,
     1061    0xb4c, 0xb47, 0xb57, 0x0,
    10621062    // tamil
    1063     0xbca, 0xbc6, 0xbbe,
    1064     0xbcb, 0xbc7, 0xbbe,
    1065     0xbcc, 0xbc6, 0xbd7,
     1063    0xbca, 0xbc6, 0xbbe, 0x0,
     1064    0xbcb, 0xbc7, 0xbbe, 0x0,
     1065    0xbcc, 0xbc6, 0xbd7, 0x0,
    10661066    // telugu
    1067     0xc48, 0xc46, 0xc56,
     1067    0xc48, 0xc46, 0xc56, 0x0,
    10681068    // kannada
    1069     0xcc0, 0xcbf, 0xcd5,
    1070     0xcc7, 0xcc6, 0xcd5,
    1071     0xcc8, 0xcc6, 0xcd6,
    1072     0xcca, 0xcc6, 0xcc2,
    1073     0xccb, 0xcca, 0xcd5,
     1069    0xcc0, 0xcbf, 0xcd5, 0x0,
     1070    0xcc7, 0xcc6, 0xcd5, 0x0,
     1071    0xcc8, 0xcc6, 0xcd6, 0x0,
     1072    0xcca, 0xcc6, 0xcc2, 0x0,
     1073    0xccb, 0xcc6, 0xcc2, 0xcd5,
    10741074    // malayalam
    1075     0xd4a, 0xd46, 0xd3e,
    1076     0xd4b, 0xd47, 0xd3e,
    1077     0xd4c, 0xd46, 0xd57,
     1075    0xd4a, 0xd46, 0xd3e, 0x0,
     1076    0xd4b, 0xd47, 0xd3e, 0x0,
     1077    0xd4c, 0xd46, 0xd57, 0x0,
    10781078    // sinhala
    1079     0xdda, 0xdd9, 0xdca,
    1080     0xddc, 0xdd9, 0xdcf,
    1081     0xddd, 0xddc, 0xdca,
    1082     0xdde, 0xdd9, 0xddf,
     1079    0xdda, 0xdd9, 0xdca, 0x0,
     1080    0xddc, 0xdd9, 0xdcf, 0x0,
     1081    0xddd, 0xdd9, 0xdcf, 0xdca,
     1082    0xdde, 0xdd9, 0xddf, 0x0,
    10831083    0xffff
    10841084};
    10851085
    1086 static inline void splitMatra(unsigned short *reordered, int matra, int &len, int &base)
     1086static inline void splitMatra(unsigned short *reordered, int matra, int &len)
    10871087{
    10881088    unsigned short matra_uc = reordered[matra];
     
    10911091    const unsigned short *split = split_matras;
    10921092    while (split[0] < matra_uc)
    1093         split += 3;
     1093        split += 4;
    10941094
    10951095    assert(*split == matra_uc);
    10961096    ++split;
    10971097
    1098     if (indic_position(*split) == Pre) {
    1099         reordered[matra] = split[1];
    1100         memmove(reordered + 1, reordered, len*sizeof(unsigned short));
    1101         reordered[0] = split[0];
    1102         base++;
    1103     } else {
    1104         memmove(reordered + matra + 1, reordered + matra, (len-matra)*sizeof(unsigned short));
    1105         reordered[matra] = split[0];
    1106         reordered[matra+1] = split[1];
    1107     }
    1108     len++;
     1098    int added_chars = split[2] == 0x0 ? 1 : 2;
     1099
     1100    memmove(reordered + matra + added_chars, reordered + matra, (len-matra)*sizeof(unsigned short));
     1101    reordered[matra] = split[0];
     1102    reordered[matra+1] = split[1];
     1103    if(added_chars == 2)
     1104        reordered[matra+2] = split[2];
     1105    len += added_chars;
    11091106}
    11101107
     
    11311128// #define INDIC_DEBUG
    11321129#ifdef INDIC_DEBUG
    1133 #define IDEBUG qDebug
     1130#define IDEBUG hb_debug
     1131#include <stdarg.h>
     1132
     1133static void hb_debug(const char *msg, ...)
     1134{
     1135    va_list ap;
     1136    va_start(ap, msg); // use variable arg list
     1137    vfprintf(stderr, msg, ap);
     1138    va_end(ap);
     1139    fprintf(stderr, "\n");
     1140}
     1141
    11341142#else
    11351143#define IDEBUG if(0) printf
    11361144#endif
    11371145
    1138 #ifdef INDIC_DEBUG
     1146#if 0 //def INDIC_DEBUG
    11391147static QString propertiesToString(int properties)
    11401148{
     
    12451253        // #### replace the HasReph property by testing if the feature exists in the font!
    12461254        if (form(*uc) == Consonant || (script == HB_Script_Bengali && form(*uc) == IndependentVowel)) {
    1247             beginsWithRa = (properties & HasReph) && ((len > 2) && *uc == ra && *(uc+1) == halant);
     1255            if ((properties & HasReph) && (len > 2) &&
     1256                (*uc == ra || *uc == 0x9f0) && *(uc+1) == halant)
     1257                beginsWithRa = true;
    12481258
    12491259            if (beginsWithRa && form(*(uc+2)) == Control)
     
    13871397            //      them there now.
    13881398            if (matra_position == Split) {
    1389                 splitMatra(uc, matra, len, base);
     1399                splitMatra(uc, matra, len);
    13901400                // Handle three-part matras (0xccb in Kannada)
    13911401                matra_position = indic_position(uc[matra]);
    1392                 if (matra_position == Split)
    1393                     splitMatra(uc, matra, len, base);
    1394             } else if (matra_position == Pre) {
     1402            }
     1403
     1404            if (matra_position == Pre) {
    13951405                unsigned short m = uc[matra];
    13961406                while (matra--)
     
    15421552                              | BelowSubstProperty
    15431553                              | AboveSubstProperty
     1554                              | PostSubstProperty
    15441555                              | HalantProperty
    15451556                              | PositioningProperties);
     
    15991610        // blws always applies
    16001611        // abvs always applies
    1601 
    1602         // psts
    1603         // ### this looks slightly different from before, but I believe it's correct
    1604         if (reordered[len-1] != halant || base != len-2)
    1605             properties[base] &= ~PostSubstProperty;
    1606         for (i = base+1; i < len; ++i)
    1607             properties[i] &= ~PostSubstProperty;
    1608 
     1612        // psts always applies
    16091613        // halant always applies
    16101614
    16111615#ifdef INDIC_DEBUG
    1612         {
    1613             IDEBUG("OT properties:");
    1614             for (int i = 0; i < len; ++i)
    1615                 qDebug("    i: %s", ::propertiesToString(properties[i]).toLatin1().data());
    1616         }
     1616//        {
     1617//            IDEBUG("OT properties:");
     1618//            for (int i = 0; i < len; ++i)
     1619//                qDebug("    i: %s", ::propertiesToString(properties[i]).toLatin1().data());
     1620//        }
    16171621#endif
    16181622
     
    17321736                 (uc[0] == 0x0985 || uc[0] == 0x098f))
    17331737                break;
     1738            // Sinhala uses the Halant as a component of certain matras. Allow these, but keep the state on Matra.
     1739            if (script == HB_Script_Sinhala && state == Matra) {
     1740                ++pos;
     1741                continue;
     1742            }
     1743            if (script == HB_Script_Malayalam && state == Matra && uc[pos-1] == 0x0d41) {
     1744                ++pos;
     1745                continue;
     1746            }
    17341747            goto finish;
    17351748        case Nukta:
     
    17421755            // fall through
    17431756        case VowelMark:
    1744             if (state == Matra || state == IndependentVowel)
     1757            if (state == Matra || state == LengthMark || state == IndependentVowel)
    17451758                break;
    17461759            // fall through
     
    17481761            if (state == Consonant || state == Nukta)
    17491762                break;
     1763            if (state == Matra) {
     1764                // ### needs proper testing for correct two/three part matras
     1765                break;
     1766            }
    17501767            // ### not sure if this is correct. If it is, does it apply only to Bengali or should
    17511768            // it work for all Indic languages?
     
    17631780
    17641781        case LengthMark:
     1782            if (state == Matra) {
     1783                // ### needs proper testing for correct two/three part matras
     1784                break;
     1785            }
    17651786        case IndependentVowel:
    17661787        case Invalid:
  • trunk/src/3rdparty/harfbuzz/src/harfbuzz-open.c

    r2 r561  
    11151115    return error;
    11161116
     1117  cd->loaded = TRUE;
     1118
    11171119  return HB_Err_Ok;
    11181120}
  • trunk/src/3rdparty/harfbuzz/src/harfbuzz-shape.h

    r2 r561  
    162162 * Buffer for output
    163163 */
    164 typedef struct _HB_GlyphBufer HB_GlyphBuffer;
     164typedef struct _HB_GlyphBuffer HB_GlyphBuffer;
    165165struct _HB_GlyphBuffer {
    166166    int glyph_item_size;
  • trunk/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp

    r2 r561  
    638638    { HB_BasicShape, 0 },
    639639    // Khmer
    640     { HB_KhmerShape, HB_KhmerAttributes }
     640    { HB_KhmerShape, HB_KhmerAttributes },
     641    // N'Ko
     642    { HB_ArabicShape, 0}
    641643};
    642644
     
    878880    { HB_MAKE_TAG('r', 'u', 'n', 'r'), 0 },
    879881    // Khmer
    880     { HB_MAKE_TAG('k', 'h', 'm', 'r'), 1 }
     882    { HB_MAKE_TAG('k', 'h', 'm', 'r'), 1 },
     883    // N'Ko
     884    { HB_MAKE_TAG('n', 'k', 'o', ' '), 1 }
    881885};
    882886enum { NumOTScripts = sizeof(ot_scripts)/sizeof(OTScripts) };
     
    936940        return 0;
    937941    stream = (HB_Stream)malloc(sizeof(HB_StreamRec));
     942    if (!stream)
     943        return 0;
    938944    stream->base = (HB_Byte*)malloc(length);
     945    if (!stream->base) {
     946        free(stream);
     947        return 0;
     948    }
    939949    error = tableFunc(font, tag, stream->base, &length);
    940950    if (error) {
     
    951961{
    952962    HB_Face face = (HB_Face )malloc(sizeof(HB_FaceRec));
     963    if (!face)
     964        return 0;
    953965
    954966    face->isSymbolFont = false;
     
    962974    face->tmpLogClusters = 0;
    963975    face->glyphs_substituted = false;
    964 
    965     HB_Error error;
     976    face->buffer = 0;
     977
     978    HB_Error error = HB_Err_Ok;
    966979    HB_Stream stream;
    967980    HB_Stream gdefStream;
    968981
    969982    gdefStream = getTableStream(font, tableFunc, TTAG_GDEF);
     983    error = HB_Err_Not_Covered;
    970984    if (!gdefStream || (error = HB_Load_GDEF_Table(gdefStream, &face->gdef))) {
    971985        //DEBUG("error loading gdef table: %d", error);
     
    975989    //DEBUG() << "trying to load gsub table";
    976990    stream = getTableStream(font, tableFunc, TTAG_GSUB);
     991    error = HB_Err_Not_Covered;
    977992    if (!stream || (error = HB_Load_GSUB_Table(stream, &face->gsub, face->gdef, gdefStream))) {
    978993        face->gsub = 0;
     
    9861001
    9871002    stream = getTableStream(font, tableFunc, TTAG_GPOS);
     1003    error = HB_Err_Not_Covered;
    9881004    if (!stream || (error = HB_Load_GPOS_Table(stream, &face->gpos, face->gdef, gdefStream))) {
    9891005        face->gpos = 0;
     
    9971013        face->supported_scripts[i] = checkScript(face, i);
    9981014
    999     hb_buffer_new(&face->buffer);
     1015    if (hb_buffer_new(&face->buffer) != HB_Err_Ok) {
     1016        HB_FreeFace(face);
     1017        return 0;
     1018    }
    10001019
    10011020    return face;
     
    11171136HB_Bool HB_OpenTypeShape(HB_ShaperItem *item, const hb_uint32 *properties)
    11181137{
     1138    HB_GlyphAttributes *tmpAttributes;
     1139    unsigned int *tmpLogClusters;
    11191140
    11201141    HB_Face face = item->face;
     
    11241145    hb_buffer_clear(face->buffer);
    11251146
    1126     face->tmpAttributes = (HB_GlyphAttributes *) realloc(face->tmpAttributes, face->length*sizeof(HB_GlyphAttributes));
    1127     face->tmpLogClusters = (unsigned int *) realloc(face->tmpLogClusters, face->length*sizeof(unsigned int));
     1147    tmpAttributes = (HB_GlyphAttributes *) realloc(face->tmpAttributes, face->length*sizeof(HB_GlyphAttributes));
     1148    if (!tmpAttributes)
     1149        return false;
     1150    face->tmpAttributes = tmpAttributes;
     1151
     1152    tmpLogClusters = (unsigned int *) realloc(face->tmpLogClusters, face->length*sizeof(unsigned int));
     1153    if (!tmpLogClusters)
     1154        return false;
     1155    face->tmpLogClusters = tmpLogClusters;
     1156
    11281157    for (int i = 0; i < face->length; ++i) {
    11291158        hb_buffer_add_glyph(face->buffer, item->glyphs[i], properties ? properties[i] : 0, i);
  • trunk/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h

    r2 r561  
    6363        HB_Script_Runic,
    6464        HB_Script_Khmer,
     65        HB_Script_Nko,
    6566        HB_Script_Inherited,
    6667        HB_ScriptCount = HB_Script_Inherited
     
    103104        HB_Script_Phoenician = Common,
    104105        HB_Script_PhagsPa = Common,
    105         HB_Script_Nko = Common
    106106        */
    107107} HB_Script;
     
    243243} HB_FontRec;
    244244
    245 typedef struct {
    246     const HB_UChar16 *string;
    247     hb_uint32 stringLength;
    248     HB_ScriptItem item;
    249     HB_Font font;
    250     HB_Face face;
    251     int shaperFlags; /* HB_ShaperFlags */
    252 
    253     HB_Bool glyphIndicesPresent; /* set to true if the glyph indicies are already setup in the glyphs array */
    254     hb_uint32 initialGlyphCount;
    255 
    256     hb_uint32 num_glyphs; /* in: available glyphs out: glyphs used/needed */
    257     HB_Glyph *glyphs; /* out parameter */
    258     HB_GlyphAttributes *attributes; /* out */
    259     HB_Fixed *advances; /* out */
    260     HB_FixedPoint *offsets; /* out */
    261     unsigned short *log_clusters; /* out */
     245typedef struct HB_ShaperItem_ HB_ShaperItem;
     246
     247struct HB_ShaperItem_ {
     248    const HB_UChar16 *string;               /* input: the Unicode UTF16 text to be shaped */
     249    hb_uint32 stringLength;                 /* input: the length of the input in 16-bit words */
     250    HB_ScriptItem item;                     /* input: the current run to be shaped: a run of text all in the same script that is a substring of <string> */
     251    HB_Font font;                           /* input: the font: scale, units and function pointers supplying glyph indices and metrics */
     252    HB_Face face;                           /* input: the shaper state; current script, access to the OpenType tables , etc. */
     253    int shaperFlags;                        /* input (unused) should be set to 0; intended to support flags defined in HB_ShaperFlag */
     254    HB_Bool glyphIndicesPresent;            /* input: true if the <glyphs> array contains glyph indices ready to be shaped */
     255    hb_uint32 initialGlyphCount;            /* input: if glyphIndicesPresent is true, the number of glyph indices in the <glyphs> array */
     256
     257    hb_uint32 num_glyphs;                   /* input: capacity of output arrays <glyphs>, <attributes>, <advances>, <offsets>, and <log_clusters>; */
     258                                            /* output: required capacity (may be larger than actual capacity) */
     259
     260    HB_Glyph *glyphs;                       /* output: <num_glyphs> indices of shaped glyphs */
     261    HB_GlyphAttributes *attributes;         /* output: <num_glyphs> glyph attributes */
     262    HB_Fixed *advances;                     /* output: <num_glyphs> advances */
     263    HB_FixedPoint *offsets;                 /* output: <num_glyphs> offsets */
     264    unsigned short *log_clusters;           /* output: for each output glyph, the index in the input of the start of its logical cluster */
    262265
    263266    /* internal */
    264     HB_Bool kerning_applied; /* out: kerning applied by shaper */
    265 } HB_ShaperItem;
     267    HB_Bool kerning_applied;                /* output: true if kerning was applied by the shaper */
     268};
    266269
    267270HB_Bool HB_ShapeItem(HB_ShaperItem *item);
  • trunk/src/3rdparty/harfbuzz/src/harfbuzz-stream.c

    r2 r561  
    7171                 HB_UInt pos )
    7272{
    73   HB_Error  error = 0;
     73  HB_Error  error = (HB_Error)0;
    7474
    7575  stream->pos = pos;
  • trunk/src/3rdparty/harfbuzz/tests/shaping/main.cpp

    r2 r561  
    179179    void kannada();
    180180    void malayalam();
    181     // sinhala missing
     181    void sinhala();
    182182
    183183    void khmer();
     184    void nko();
    184185    void linearB();
    185186};
     
    511512                { { 0x9b0, 0x9cd, 0x995, 0x9be, 0x983, 0x0 },
    512513                  { 0x151, 0x276, 0x172, 0x144, 0x0 } },
     514                // test decomposed two parts matras
     515                { { 0x995, 0x9c7, 0x9be, 0x0 },
     516                  { 0x179, 0x151, 0x172, 0x0 } },
     517                { { 0x995, 0x9c7, 0x9d7, 0x0 },
     518                  { 0x179, 0x151, 0x17e, 0x0 } },
     519                { { 0x9b0, 0x9cd, 0x9ad, 0x0 },
     520                  { 0x168, 0x276, 0x0 } },
     521                { { 0x9f0, 0x9cd, 0x9ad, 0x0 },
     522                  { 0x168, 0x276, 0x0 } },
     523                { { 0x9f1, 0x9cd, 0x9ad, 0x0 },
     524                  { 0x191, 0x17d, 0x168, 0x0 } },
    513525
    514526                { {0}, {0} }
     
    639651            const ShapeTable shape_table [] = {
    640652                { { 0x09a8, 0x09cd, 0x09af, 0x0 },
    641                   { 0x0192, 0x0 } },
     653                  { 0x01ca, 0x0 } },
    642654                { { 0x09b8, 0x09cd, 0x09af, 0x0 },
    643                   { 0x01d6, 0x0 } },
     655                  { 0x020e, 0x0 } },
    644656                { { 0x09b6, 0x09cd, 0x09af, 0x0 },
    645                   { 0x01bc, 0x0 } },
     657                  { 0x01f4, 0x0 } },
    646658                { { 0x09b7, 0x09cd, 0x09af, 0x0 },
    647                   { 0x01c6, 0x0 } },
     659                  { 0x01fe, 0x0 } },
    648660                { { 0x09b0, 0x09cd, 0x09a8, 0x09cd, 0x200d, 0x0 },
    649                   { 0xd3, 0x12f, 0x0 } },
     661                  { 0x10b, 0x167, 0x0 } },
     662                { { 0x9b0, 0x9cd, 0x9ad, 0x0 },
     663                  { 0xa1, 0x167, 0x0 } },
     664                { { 0x9f0, 0x9cd, 0x9ad, 0x0 },
     665                  { 0xa1, 0x167, 0x0 } },
     666                { { 0x9f1, 0x9cd, 0x9ad, 0x0 },
     667                  { 0x11c, 0xa1, 0x0 } },
    650668
    651669                { {0}, {0} }
     
    669687{
    670688    {
    671         FT_Face face = loadFace("lohit.punjabi.1.1.ttf");
     689        FT_Face face = loadFace("lohit_pa.ttf");
    672690        if (face) {
    673691            const ShapeTable shape_table [] = {
     
    824842                { { 0xc15, 0xc4d, 0xc30, 0xc48, 0x0 },
    825843                  { 0xe6, 0xb3, 0x9f, 0x0 } },
    826                 { {0}, {0} }
    827 
     844                { { 0xc15, 0xc46, 0xc56, 0x0 },
     845                  { 0xe6, 0xb3, 0x0 } },
     846                { {0}, {0} }
    828847            };
    829848
     
    868887                { { 0x0cb0, 0x0ccd, 0x200d, 0x0c95, 0x0 },
    869888                  { 0x0050, 0x00a7, 0x0 } },
    870 
    871889                { {0}, {0} }
    872890            };
     
    892910                { { 0x0cb7, 0x0ccd, 0x0 },
    893911                  { 0x0163, 0x0 } },
     912                { { 0xc95, 0xcbf, 0xcd5, 0x0 },
     913                  { 0x114, 0x73, 0x0 } },
     914                { { 0xc95, 0xcc6, 0xcd5, 0x0 },
     915                  { 0x90, 0x6c, 0x73, 0x0 } },
     916                { { 0xc95, 0xcc6, 0xcd6, 0x0 },
     917                  { 0x90, 0x6c, 0x74, 0x0 } },
     918                { { 0xc95, 0xcc6, 0xcc2, 0x0 },
     919                  { 0x90, 0x6c, 0x69, 0x0 } },
     920                { { 0xc95, 0xcca, 0xcd5, 0x0 },
     921                  { 0x90, 0x6c, 0x69, 0x73, 0x0 } },
     922
    894923
    895924                { {0}, {0} }
     
    944973                { { 0x0d30, 0x0d4d, 0x200d, 0x0 },
    945974                  { 0x009e, 0x0 } },
    946 
     975                { { 0xd15, 0xd46, 0xd3e, 0x0 },
     976                  { 0x5e, 0x34, 0x58, 0x0 } },
     977                { { 0xd15, 0xd47, 0xd3e, 0x0 },
     978                  { 0x5f, 0x34, 0x58, 0x0 } },
     979                { { 0xd15, 0xd46, 0xd57, 0x0 },
     980                  { 0x5e, 0x34, 0x65, 0x0 } },
     981                { { 0xd15, 0xd57, 0x0 },
     982                  { 0x34, 0x65, 0x0 } },
     983                { { 0xd1f, 0xd4d, 0xd1f, 0xd41, 0xd4d, 0x0 },
     984                  { 0x69, 0x5b, 0x64, 0x0 } },
    947985
    948986                { {0}, {0} }
     
    961999        }
    9621000    }
    963 }
    964 
     1001
     1002    {
     1003        FT_Face face = loadFace("Rachana.ttf");
     1004        if (face) {
     1005            const ShapeTable shape_table [] = {
     1006                { { 0xd37, 0xd4d, 0xd1f, 0xd4d, 0xd30, 0xd40, 0x0 },
     1007                  { 0x385, 0xa3, 0x0 } },
     1008                { { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0x0 },
     1009                  { 0x2ff, 0x0 } },
     1010                { { 0xd33, 0xd4d, 0xd33, 0x0 },
     1011                  { 0x3f8, 0x0 } },
     1012                { { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0x0 },
     1013                  { 0x2ff, 0x0 } },
     1014
     1015                { {0}, {0} }
     1016            };
     1017
     1018
     1019            const ShapeTable *s = shape_table;
     1020            while (s->unicode[0]) {
     1021                QVERIFY( shaping(face, s, HB_Script_Malayalam) );
     1022                ++s;
     1023            }
     1024
     1025            FT_Done_Face(face);
     1026        } else {
     1027            QSKIP("couln't find Rachana.ttf", SkipAll);
     1028        }
     1029    }
     1030
     1031}
     1032
     1033void tst_QScriptEngine::sinhala()
     1034{
     1035    {
     1036        FT_Face face = loadFace("FM-MalithiUW46.ttf");
     1037        if (face) {
     1038            const ShapeTable shape_table [] = {
     1039                { { 0xd9a, 0xdd9, 0xdcf, 0x0 },
     1040                  { 0x4a, 0x61, 0x42, 0x0 } },
     1041                { { 0xd9a, 0xdd9, 0xddf, 0x0 },
     1042                  { 0x4a, 0x61, 0x50, 0x0 } },
     1043                { { 0xd9a, 0xdd9, 0xdca, 0x0 },
     1044                  { 0x4a, 0x62, 0x0 } },
     1045                { { 0xd9a, 0xddc, 0xdca, 0x0 },
     1046                  { 0x4a, 0x61, 0x42, 0x41, 0x0 } },
     1047                { { 0xd9a, 0xdda, 0x0 },
     1048                  { 0x4a, 0x62, 0x0 } },
     1049                { { 0xd9a, 0xddd, 0x0 },
     1050                  { 0x4a, 0x61, 0x42, 0x41, 0x0 } },
     1051                { {0}, {0} }
     1052            };
     1053
     1054            const ShapeTable *s = shape_table;
     1055            while (s->unicode[0]) {
     1056                QVERIFY( shaping(face, s, HB_Script_Sinhala) );
     1057                ++s;
     1058            }
     1059
     1060            FT_Done_Face(face);
     1061        } else {
     1062            QSKIP("couln't find FM-MalithiUW46.ttf", SkipAll);
     1063        }
     1064    }
     1065}
    9651066
    9661067
     
    10061107}
    10071108
     1109void tst_QScriptEngine::nko()
     1110{
     1111    {
     1112        FT_Face face = loadFace("DejaVuSans.ttf");
     1113        if (face) {
     1114            const ShapeTable shape_table [] = {
     1115                { { 0x7ca, 0x0 },
     1116                  { 0x5c1, 0x0 } },
     1117                { { 0x7ca, 0x7ca, 0x0 },
     1118                  { 0x14db, 0x14d9, 0x0 } },
     1119                { { 0x7ca, 0x7fa, 0x7ca, 0x0 },
     1120                  { 0x14db, 0x5ec, 0x14d9, 0x0 } },
     1121                { { 0x7ca, 0x7f3, 0x7ca, 0x0 },
     1122                  { 0x14db, 0x5e7, 0x14d9, 0x0 } },
     1123                { { 0x7ca, 0x7f3, 0x7fa, 0x7ca, 0x0 },
     1124                  { 0x14db, 0x5e7, 0x5ec, 0x14d9, 0x0 } },
     1125                { {0}, {0} }
     1126            };
     1127
     1128
     1129            const ShapeTable *s = shape_table;
     1130            while (s->unicode[0]) {
     1131                QVERIFY( shaping(face, s, HB_Script_Nko) );
     1132                ++s;
     1133            }
     1134
     1135            FT_Done_Face(face);
     1136        } else {
     1137            QSKIP("couln't find DejaVuSans.ttf", SkipAll);
     1138        }
     1139    }
     1140}
     1141
     1142
    10081143void tst_QScriptEngine::linearB()
    10091144{
    10101145    {
    1011         FT_Face face = loadFace("PENUTURE.TTF");
     1146        FT_Face face = loadFace("penuture.ttf");
    10121147        if (face) {
    10131148            const ShapeTable shape_table [] = {
Note: See TracChangeset for help on using the changeset viewer.