Package org.fonteditor.options.coords

Examples of org.fonteditor.options.coords.Coords


  private static DisplayOptions getGDOdefaults() {
    return new DisplayOptions(DEFAULT_SLANT, DEFAULT_EXPAND, DEFAULT_HINT, DEFAULT_FILL, DisplayOptionsConstants.DEFAULT_PEN, DEFAULT_COORDS);
  }

  public static DisplayOptions getGDOrender(int siz, int aa_sf_x, int aa_sf_y, Pen pen, boolean filled) {
    Coords c = new Coords((siz >> 1) * aa_sf_x, siz * aa_sf_y, siz >> 1, siz);

    return new DisplayOptions(DEFAULT_SLANT, DEFAULT_EXPAND, true, filled, pen, c);
  }
View Full Code Here


      return;
    }

    KerningType kerning_type = default_kerning_type;

    Coords coords = gdo.getCoords();

    char last_c = CHARACTER_BAR;
    x -= getKerningDistance(last_c, font, gdo, last_c, font, gdo,
        kerning_type);
    x -= Kerning.getKerningGap(coords.getAAHeight());

    for (int i = start; i < start + len; i++)
    {
      char c = chars[i];

      if (c > 126)
      {
        Log.log("C:" + (int) c); /// doesn't fire...
      }

      int kd = getKerningDistance(last_c, font, gdo, c, font, gdo,
          kerning_type);

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

      last_c = c;

      CachedGlyph cached_glyph = getCachedGlyph(c, font, gdo);
      ImageWrapper i_w = cached_glyph.getImageWrapper();
View Full Code Here

    return cache[c];
  }

  private void makeGlyph(char c, FEFont fefont, DisplayOptions gdo)
  {
    Coords coords = gdo.getCoords();

    int scale_factor_x = coords.getWidth() / coords.getAAWidth();
    int scale_factor_y = coords.getHeight() / coords.getAAHeight();

    FEGlyph feg = fefont.getGlyphArray().getGlyph(c);

    Claim.claim(feg != null, "FEG = null: [" + c + "] - (" + (int) c + ")");

    int x_max = feg.getMaxX(gdo);
    int y_max = feg.getMaxY(gdo);

    //feg.getFEPointList(gdo).dump();

    // Log.log("x_max:" + x_max + " y_max:" + y_max);

    if (gdo.getPen().getWidth() > 0)
    {
      x_max += gdo.getLineWidthOffsetEast()
          - gdo.getLineWidthOffsetWest();
      y_max += gdo.getLineWidthOffsetSouth()
          - gdo.getLineWidthOffsetNorth();
    }

    x_max = coords.scaleX(x_max);
    y_max = coords.scaleY(y_max);

    x_max = ((x_max + scale_factor_x) / scale_factor_x) * scale_factor_x; // + scale_factor_x;
    y_max = ((y_max + scale_factor_y) / scale_factor_y) * scale_factor_y; // + scale_factor_y;

    if (x_max < scale_factor_x)
View Full Code Here

TOP

Related Classes of org.fonteditor.options.coords.Coords

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.