Package org.fonteditor.cache

Examples of org.fonteditor.cache.CachedGlyph


  public int getAscent() {
    return getCachedGlyph(CHARACTER_ASCENT).getHeight();
  }

  public int getDescent() {
    CachedGlyph cached_glyph_g = getCachedGlyph(CHARACTER_DESCENT);
    CachedGlyph cached_glyph_h = getCachedGlyph(CHARACTER_ASCENT);
    int bottom_of_g = cached_glyph_g.getHeight() + cached_glyph_g.getOffsetY();
    int bottom_of_h = cached_glyph_h.getHeight() + cached_glyph_h.getOffsetY();

    return bottom_of_g - bottom_of_h;
  }
View Full Code Here


    //coords.scaleY(font1.getHintingCues().getBottomLetterO() >> 3);

    c1 = KerningPreprocessor.process(c1);
    c2 = KerningPreprocessor.process(c2);

    CachedGlyph cached_glyph1 = fefontcache.getCachedGlyph(font1, gdo1, c1);
    CachedGlyph cached_glyph2 = fefontcache.getCachedGlyph(font2, gdo2, c2);

    return kerning_type.getKerningDistance(cached_glyph1, cached_glyph2);
  }
View Full Code Here

      x += kd + Kerning.getKerningGap(coords.getAAHeight());

      last_c = c;

      CachedGlyph cached_glyph = getCachedGlyph(c, font, gdo);
      ImageWrapper i_w = cached_glyph.getImageWrapper();

      int offset_y = cached_glyph.getOffsetY();

      graphics.drawImage(i_w.getImage(), x, y + offset_y, null);
    }
  }
View Full Code Here

    return max_width;
  }

  /** Returns the distance from the bottom of the character to the maximum ascent point. */
  private int getAscentPlusDescent(char ch) {
    CachedGlyph glyph = getCachedGlyph(ch);
    return glyph.getOffsetY() + glyph.getHeight();
  }
View Full Code Here

    CachedGlyph glyph = getCachedGlyph(ch);
    return glyph.getOffsetY() + glyph.getHeight();
  }

  public int charWidth(char ch) {
    CachedGlyph glyph = getCachedGlyph(ch);
    return glyph.getWidth();
  }
View Full Code Here

TOP

Related Classes of org.fonteditor.cache.CachedGlyph

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.