Examples of Glyph


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

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

      for (int i = offset; i < maxPos; i++)
      {
        final Glyph g = gs.getGlyph(i);
        final Spacing spacing = g.getSpacing();
        if (i != offset)
        {
          final float optimum = (float) StrictGeomUtility.toFontMetricsValue(spacing.getMinimum());
          if (optimum != 0)
          {
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 long realCharSpace = convert(width - kerning);
      realCharTotal += realCharSpace;
      wordMinChunkWidth += realCharSpace;
      if (i != (lastPos - 1))
      {
        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();
      }

      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 = getOffset();
    final int maxPos = offset + length;

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

Examples of org.takadb.editor.database.entities.ElementEntity.Glyph

    // glyphs
    iter = element.glyphs.variantMap.keySet().iterator();
    while (iter.hasNext()) {
      Integer glyphVariant = (Integer)iter.next();
      Glyph glyph = element.glyphs.get (glyphVariant);
      sqlSaveElementGlyph (conn, element, glyphVariant, glyph);
    }
   
  }
View Full Code Here

Examples of org.takadb.editor.database.entities.ElementEntity.Glyph

        String strokes = rs.getString ("strokes");
        // FIXME bodge - fix in database
        if ((strokes.length() > 0) && (strokes.charAt (strokes.length() - 1) != '\n'))
          strokes += "\n";
        Glyph glyph = new Glyph (
            rs.getInt ("width"),
            rs.getInt ("height"),
            new int[] { rs.getInt ("p1_glyph_variant"),
                        rs.getInt ("p2_glyph_variant"),
                        rs.getInt ("p3_glyph_variant"),
View Full Code Here

Examples of org.toyz.litetext.Glyph

          // TODO Auto-generated catch block
          e1.printStackTrace();
        }
        continue;
      }
      Glyph g = new Glyph();
      g.setWidth(Integer.parseInt(gprops.getProperty("width")));
      g.setHeight(Integer.parseInt(gprops.getProperty("height")));
      g.setX(Integer.parseInt(gprops.getProperty("x")));
      g.setY(Integer.parseInt(gprops.getProperty("y")));
      g.setXadd(Integer.parseInt(gprops.getProperty("xadd")));

      try {
        in.close();
      } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
      try {
                InputStream is = FontUtils.class.getResourceAsStream("/fonts/" + fontname + "/glyph_bmap." + i);
                g.setBmap(getBytesFromInputStream(is, g.getWidth() * g.getHeight()));
//        g.setBmap(getBytesFromFile(new File("fonts/" + fontname + "/glyph_bmap." + i)));
      } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        return null;
View Full Code Here

Examples of org.toyz.litetext.Glyph

      boolean no_chars_yet;
         /* logical: we haven't seen any renderable characters yet in
        the line.
     */
   Glyph lastGlyph = null;
     /* Glyph of last character processed so far.  Undefined if
        'no_chars_yet'.
     */

   no_chars_yet = true;   /* initial value */
   bwid = 0/* initial value */
   accumulated_ics = (float) 0.0/* initial value */
  
    for (cursor = 0; cursor < line.length(); cursor++) {
       
        Glyph g = font.getGlyph((int)line.charAt(cursor));   
        if (g == null) {
          g = font.getGlyph(' ');
        }
        if (g != null) {
            if (no_chars_yet) {
                no_chars_yet = false;
                if (g.getX() < 0)
                    backup_space_needed = -g.getX();
                else {
                    backup_space_needed = 0;
                    bwid += g.getX();
                }
            } else {
                /* handle extra intercharacter space (-space option) */
                int full_pixels;  /* integer part of accumulated_ics */
                accumulated_ics += intercharacter_space;
                full_pixels = (int) accumulated_ics;
                bwid += full_pixels;
                accumulated_ics -= full_pixels;
            }
            lastGlyph = g;
            bwid += g.getXadd();
        }      
    }
    if (no_chars_yet)
        /* Line has no renderable characters */
        backup_space_needed = 0;
View Full Code Here

Examples of org.toyz.litetext.Glyph

      leftcol = leftmargin;
      accumulated_ics = (float) 0.0; /* initial value */

      for (cursor = 0; cursor < lines[line].length(); ++cursor) {
        int glyphIndex = (int) lines[line].charAt(cursor);
        Glyph glyph; /* the glyph for this character */

        glyph = font.getGlyph(glyphIndex);
        if (glyph == null) {
          glyph = font.getGlyph(' ');
        }
        if (glyph != null) {
          int toprow = row + font.getMaxheight() + font.getY()
              - glyph.getHeight() - glyph.getY();
          /* row number in image of top row in glyph */

          insert_character(glyph, toprow, leftcol, bits);

          leftcol += glyph.getXadd();
          {
            /* handle extra intercharacter space (-space option) */
            int full_pixels; /* integer part of accumulated_ics */
            accumulated_ics += intercharacter_space;
            full_pixels = (int) accumulated_ics;
View Full Code Here

Examples of processing.core.PFont.Glyph

    List<BitmapFontCharacter> bitMapCharacters = new ArrayList<BitmapFontCharacter>();
   
    for (int i = 0; i < chars.length(); i++) {
      char c = chars.charAt(i);
//      int charIndex = p5Font.index(c);
      Glyph glyph = p5Font.getGlyph(c);
      if (glyph != null){
        PImage charImage = glyph.image;
        int charWidth = glyph.width;
        int charHeight = glyph.height;
        int topExtend = glyph.topExtent;
View Full Code Here

Examples of tripleplay.util.Glyph

        if (size.width() == 0 || size.height() == 0) {
            log.warning("SizableWidget cannot prepare a glyph with a 0 dimension", "size", size);
            return null;
        }

        glyph = glyph == null ? new Glyph(layer) : glyph;
        glyph.prepare(size);
        return glyph;
    }
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.