Package com.jgraph.gaeawt.java.awt

Examples of com.jgraph.gaeawt.java.awt.Font


    in.close();

    Graphics2D g2 = imageARGB.createGraphics();
    g2.rotate(-Math.PI / 12, image.getWidth() / 2, image.getHeight() / 2);
    String s = "bella";
    Font font = new Font("Serif", Font.PLAIN, 192);
    FontRenderContext frc = g2.getFontRenderContext();
    //GlyphVector gv = font.createGlyphVector(frc, s);
    //Shape clippingShape = gv.getOutline(10, 200);
    // FIXME when font rendering implemented
    //g2.clip(clippingShape);
View Full Code Here


     * @param runStarts - starts of the resulting font runs
     * @param fonts - mapping of the font run starts to the fonts
     */
    static void findFonts(char text[], int runStart, int runLimit, List<Integer> runStarts,
            Map<Integer, Object> fonts) {
        Font prevFont = null;
        Font currFont;
        for (int i = runStart; i < runLimit; i++) {
            currFont = findFontForChar(text[i]);
            if (currFont != prevFont) {
                prevFont = currFont;
                Integer idx = new Integer(i);
View Full Code Here

        HashMap<Integer, Object> fonts = breaker.fonts;

        Object val = fonts.get(new Integer(0));

        if (val instanceof Font) {
            Font firstFont = (Font) val;
            LineMetrics lm = firstFont.getLineMetrics(breaker.text, 0, 1, breaker.frc);
            baselineOffsets = lm.getBaselineOffsets();
            baselineIndex = lm.getBaselineIndex();
        } else if (val instanceof GraphicAttribute) {
            // Get first graphic attribute and use it
            GraphicAttribute ga = (GraphicAttribute) val;
View Full Code Here

       
    }
   
    private Font addFont(String path, int type)
    {
      return new Font(null);
    }
View Full Code Here

       
        String[] strMas = path.list(filter);
       
        String dir = path.getAbsolutePath();
       
        Font newFont;
       
        for (int i = 0; i < strMas.length; i++) {
            String str = strMas[i].substring(strMas[i].length() - 3).toLowerCase();
            newFont = addFont(dir + "/" + strMas[i], str.equals("ttf") ? Font.TRUETYPE_FONT : Font.TYPE1_FONT);
           
View Full Code Here

    public Font[] getAllFonts() {       
        return allFonts.toArray(new Font[0]);       
    }
   
    public Font embedFont(String path, int type) throws FontFormatException, IOException {
        Font newFont = addFont(path, type);
       
        if (newFont == null) {
            if ((new File(path)).canRead()) {
                //awt.9B=Can't create font - bad font data
                throw new FontFormatException ( Messages.getString("awt.9B") ); //$NON-NLS-1$                       
View Full Code Here

        RenderingHints.VALUE_ANTIALIAS_ON);
    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...
View Full Code Here

TOP

Related Classes of com.jgraph.gaeawt.java.awt.Font

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.