Package com.itextpdf.text.pdf

Examples of com.itextpdf.text.pdf.Glyph


           
            for (Integer constituentGlyphId : constituentGlyphs) {
                chars.append(getTextFromGlyph(constituentGlyphId, glyphToCharacterMap));
            }
           
            Glyph glyph = new Glyph(glyphIdToReplace, glyphWidthsByIndex[glyphIdToReplace], chars.toString());
           
            glyphSubstitutionMap.put(glyph.chars, glyph);
        }
       
        return Collections.unmodifiableMap(glyphSubstitutionMap);
View Full Code Here


abstract class IndicGlyphRepositioner implements GlyphRepositioner {

  public void repositionGlyphs(List<Glyph> glyphList) {

    for (int i = 0; i < glyphList.size(); i++) {
      Glyph glyph = glyphList.get(i);
      Glyph nextGlyph = getNextGlyph(glyphList, i);

      if ((nextGlyph != null)
          && getCharactersToBeShiftedLeftByOnePosition().contains(
              nextGlyph.chars)) {
        glyphList.set(i, nextGlyph);
View Full Code Here

 
  @Override
  public void repositionGlyphs(List<Glyph> glyphList) {
   
    for (int i = 0; i < glyphList.size(); i++) {
      Glyph glyph = glyphList.get(i);
     
      if (glyph.chars.equals("\u09CB")) {
        handleOKaarAndOUKaar(i, glyphList, '\u09C7', '\u09BE');
      } else if (glyph.chars.equals("\u09CC")) {
        handleOKaarAndOUKaar(i, glyphList, '\u09C7', '\u09D7');
View Full Code Here

   * a Byanjan Borno like Ka (\u0995), the O-kar is split into two characters: the E-Kar (\u09C7) and the A-Kar (\u09BE).
   * Similar the Ou-Kar is split into two characters: the E-Kar (\u09C7) and the char (\u09D7).
   *
   */
  private void handleOKaarAndOUKaar(int currentIndex, List<Glyph> glyphList, char first, char second) {
        Glyph g1 = getGlyph(first);
        Glyph g2 = getGlyph(second);
        glyphList.set(currentIndex, g1);
        glyphList.add(currentIndex + 1, g2);
  }
View Full Code Here

        glyphList.add(currentIndex + 1, g2);
  }
 
  private Glyph getGlyph(char c) {
   
    Glyph glyph = glyphSubstitutionMap.get(String.valueOf(c));
   
    if (glyph != null) {
      return glyph;
    }
   
    int[] metrics = cmap31.get(Integer.valueOf(c));
        int glyphCode = metrics[0];
        int glyphWidth = metrics[1];
        return new Glyph(glyphCode, glyphWidth, String.valueOf(c));
  }
View Full Code Here

TOP

Related Classes of com.itextpdf.text.pdf.Glyph

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.