Examples of Glyph


Examples of org.jnode.awt.font.spi.Glyph

        double width = 0;
        double height = 0;
        for (char c = ci.setIndex(begin); ci.getIndex() <= limit; c = ci.next()) {
            try {
                Glyph g = container.getGlyph(c);
                if (g != null) {
                    width += g.getBBox().getWidth();
                    height = Math.max(g.getBBox().getHeight(), height);
                }
            } catch (IOException e) {
                e.printStackTrace();
            }               
        }
View Full Code Here

Examples of org.kite9.diagram.adl.Glyph

   *
   * @return
   */
  @Kite9Item
  public Diagram someDesignItem() {
    Glyph g1 = new Glyph("stereo", "project:" + this.getClass().getName(), null, null);
    Glyph g2 = new Glyph("stereo", "project:" + Another.class.getName(), null, null);

    return new Diagram("somename", createList((Contained) g1, g2), null);
  }
View Full Code Here

Examples of org.newdawn.slick.font.Glyph

    if (effects.isEmpty())
      throw new IllegalStateException("The UnicodeFont must have at least one effect before any glyphs can be loaded.");

    for (Iterator iter = queuedGlyphs.iterator(); iter.hasNext();) {
      Glyph glyph = (Glyph)iter.next();
      int codePoint = glyph.getCodePoint();

      // Don't load an image for a glyph with nothing to display.
      if (glyph.getWidth() == 0 || codePoint == ' ') {
        iter.remove();
        continue;
      }

      // Only load the first missing glyph.
      if (glyph.isMissing()) {
        if (missingGlyph != null) {
          if (glyph != missingGlyph) iter.remove();
          continue;
        }
        missingGlyph = glyph;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.text.Glyph

    long spacerOpt = 0;

    final int lastPos = Math.min(glyphs.getSize(), offset + length);
    for (int i = offset; i < lastPos; i++)
    {
      final Glyph glyph = glyphs.getGlyph(i);
      //      heightAbove = Math.max(glyph.getBaseLine(), heightAbove);
      //      heightBelow = Math.max(glyph.getHeight() - glyph.getBaseLine(), heightBelow);
      final int kerning = glyph.getKerning();
      final int width = glyph.getWidth();
      final int realCharSpace = width - kerning;
      realCharTotal += realCharSpace;
      if (i == (lastPos - 1))
      {
        wordMinChunkWidth += realCharSpace;
      }
      else
      {
        final Spacing spacing = glyph.getSpacing();
        spacerMax += spacing.getMaximum();
        spacerMin += spacing.getMinimum();
        spacerOpt += spacing.getOptimum();
        if (normalTextSpacing == true &&
            Spacing.EMPTY_SPACING.equals(spacing) == false)
        {
          normalTextSpacing = false;
        }

        wordMinChunkWidth += spacing.getMinimum() + realCharSpace;
      }

      if (glyph.getBreakWeight() > BreakOpportunityProducer.BREAK_CHAR)
      {
        minimumChunkWidth = Math.max(minimumChunkWidth, wordMinChunkWidth);
        wordMinChunkWidth = 0;

        // Paranoid sanity checks: The word- and linebreaks should have been
        // replaced by other definitions in the text factory.
        if (glyph.getBreakWeight() == BreakOpportunityProducer.BREAK_LINE)
        {
          throw new IllegalStateException("A renderable text cannot and must " +
              "not contain linebreaks.");
        }
      }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.text.Glyph

    final int offset = node.getOffset();
    final int maxPos = offset + length;

    for (int i = offset; i < maxPos; i++)
    {
      final Glyph g = gs.getGlyph(i);
      runningPos += g.getWidth();
      if (runningPos > contentX2)
      {
        return Math.max(0, i - offset);
      }
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.text.Glyph

      final StringBuffer buffer = new StringBuffer(gs.getSize());
      final int maxPos = offset + computeMaximumTextSize(renderableText, contentX2);

      for (int i = offset; i < maxPos; i++)
      {
        final Glyph g = gs.getGlyph(i);
        final Spacing spacing = g.getSpacing();
        if (i != offset)
        {
          final int optimum = spacing.getOptimum();
          if (optimum != 0)
          {
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.text.Glyph

      final int maxPos = renderableText.getOffset() + computeMaximumTextSize(renderableText, contentX2);
      long runningPos = posX;
      final long baselineDelta = awtBaseLine - baseline;
      for (int i = renderableText.getOffset(); i < maxPos; i++)
      {
        final Glyph g = gs.getGlyph(i);
        final float y = (float) StrictGeomUtility.toExternalValue(posY + g.getBaseLine() + baselineDelta);
        g2.drawString(gs.getGlyphAsString(i, codePointBuffer), (float) StrictGeomUtility.toExternalValue(runningPos), y);
        runningPos += g.getWidth() + g.getSpacing().getMinimum();
      }
    }
    g2.dispose();
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.text.Glyph

    final int offset = node.getOffset();
    final int maxPos = offset + length;

    for (int i = offset; i < maxPos; i++)
    {
      final Glyph g = gs.getGlyph(i);
      runningPos += g.getWidth();
      if (runningPos > contentX2)
      {
        return Math.max(0, i - offset);
      }
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.text.Glyph

    final int offset = node.getOffset();
    final int maxPos = offset + length;

    for (int i = offset; i < maxPos; i++)
    {
      final Glyph g = gs.getGlyph(i);
      runningPos += g.getWidth();
      if (runningPos > contentX2)
      {
        return Math.max(0, i - offset);
      }
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.text.Glyph

      final long baselineDelta = awtBaseLine - baseline;
      final float y = (float) (StrictGeomUtility.toExternalValue
          (posY + awtBaseLine + baselineDelta));
      for (int i = renderableText.getOffset(); i < maxPos; i++)
      {
        final Glyph g = gs.getGlyph(i);
        g2.drawString(gs.getGlyphAsString(i, codePointBuffer),
            (float) StrictGeomUtility.toExternalValue(runningPos), y);
        runningPos += RenderableText.convert(g.getWidth()) + g.getSpacing().getMinimum();
      }
    }
    g2.dispose();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.