Package com.jgraph.gaeawt.java.awt.font

Examples of com.jgraph.gaeawt.java.awt.font.GlyphVector


        /**
         * Attempts to map each character to the corresponding advance increment
         */
        void initAdvanceMapping() {
            GlyphVector gv = getGlyphVector();
            int charIndicies[] = gv.getGlyphCharIndices(0, gv.getNumGlyphs(), null);
            advanceIncrements = new float[info.length];

            for (int i=0; i<charIndicies.length; i++) {
                advanceIncrements[charIndicies[i]] = gv.getGlyphMetrics(i).getAdvance();
            }
        }
View Full Code Here


         * Attempts to create mapping of the characters to glyphs in the glyph vector.
         * @return array where for each character index stored corresponding glyph index
         */
        private int[] getChar2Glyph() {
            if (char2glyph == null) {
                GlyphVector gv = getGlyphVector();
                char2glyph = new int[info.length];
                Arrays.fill(char2glyph, -1);

                // Fill glyph indicies for first characters corresponding to each glyph
                int charIndicies[] = gv.getGlyphCharIndices(0, gv.getNumGlyphs(), null);
                for (int i=0; i<charIndicies.length; i++) {
                    char2glyph[charIndicies[i]] = i;
                }

                // If several characters corresponds to one glyph, create mapping for them
View Full Code Here

         * Collects GlyphJustificationInfo objects from the glyph vector
         * @return array of all GlyphJustificationInfo objects
         */
        private GlyphJustificationInfo[] getGlyphJustificationInfos() {
            if (gjis == null) {
                GlyphVector gv = getGlyphVector();
                int nGlyphs = gv.getNumGlyphs();
                int charIndicies[] = gv.getGlyphCharIndices(0, nGlyphs, null);
                gjis = new GlyphJustificationInfo[nGlyphs];

                // Patch: temporary patch, getGlyphJustificationInfo is not implemented
                float fontSize = info.font.getSize2D();
                GlyphJustificationInfo defaultInfo =
View Full Code Here

  @Override
  public void drawString(AttributedCharacterIterator iterator, float x,
      float y)
  {
    GlyphVector gv = font.createGlyphVector(frc, iterator);
    drawGlyphVector(gv, x, y);
  }
View Full Code Here

    FontRenderContext frc = g2d.getFontRenderContext();
    //String font_name = RipperFontSelector.choose_font.choice.getSelectedItem();
    //Log.log(font_name);
    int size = 256;
    Font font = new Font(font_name, font_style, size);
    GlyphVector gv = font.createGlyphVector(frc, "" + (char) number);

    shape_array[number] = gv.getOutline();

    // Possibly process them - extracting statistics, etc...
    // Extract the curves from the shapes...
    FEGlyph glyph = new FEGlyph(fefont, number);
View Full Code Here

TOP

Related Classes of com.jgraph.gaeawt.java.awt.font.GlyphVector

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.