Logo Search packages:      
Sourcecode: yudit version File versions

bool SFontTTF::findSouthIndicGlyphs ( const SString key,
unsigned int  scriptcode,
const char *  script,
const SS_UCS4 *  chars,
unsigned int  liglen,
SV_GlyphIndex out 
) [protected]

Find the glyphs for south indian scirpts and return them. Put the positions of characters in mark2BaseList under key.

Parameters:
scriptcode is one of SD_LAO, SD_THAI, SD_TIBETAN
in are the input characters
len is the length of input characters
out is filled with glyphIndeces
Returns:
true if conversion was successful

Definition at line 2303 of file SFontOTF.cpp.

References SBinVector< Type >::append(), findGlyph(), getOTFLigatures(), and storeMarkPositions().

Referenced by findGlyphs().

{
  /* find all glyphs */
  unsigned int i;
  SS_GlyphIndex* gv = new SS_GlyphIndex[liglen];
  CHECK_NEW (gv);
  for (i=0; i<liglen; i++)
  {
    gv[i] = findGlyph (chars[i]);
    if (gv[i]==0)
    {
      delete gv;
      return false;
    }
  }

  /* find ligatures */
  bool base = false;
  liglen = getOTFLigatures (gv, liglen, script, "liga", 0, 0, &base);
  if (liglen == 0) return false; /* never */
  if (liglen==1)
  {
    out->append (gv[0]);
    delete gv;
    return true;
  }
  /* find the positions of these glyphs */
  storeMarkPositions (key, gv, liglen); 

  /* copy glyphs */
  for (i=0; i<liglen; i++)
  {
    out->append (gv[i]);
  }
  delete gv;
  return true;
}


Generated by  Doxygen 1.6.0   Back to index