Package java.awt

Examples of java.awt.Font.deriveFont()


          throw new JRRuntimeException("The '" + face.getName() + "' font face in family '" + family.getName() + "' returns a null font.");
        }

        awtFont = awtFont.deriveFont((float)size);
       
        awtFont = awtFont.deriveFont(style & ~faceStyle);
      }
    }
   
    return awtFont;
  }
View Full Code Here


        attributes.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON);
      }
     
      if (!attributes.isEmpty())
      {
        awtFont = awtFont.deriveFont(attributes);
      }
    }
   
    return awtFont;
  }
View Full Code Here

          if (AWT_SUPERSCRIPT_FIX_ENABLED && atrans != null)
          {
            double y = atrans.getTranslateY();
            atrans = new AffineTransform();
            atrans.translate(0, - y);
            awtFont = awtFont.deriveFont(atrans);
            atrans = null;
          }
          Integer superscript = (Integer)attrs.get(TextAttribute.SUPERSCRIPT);
          if (TextAttribute.SUPERSCRIPT_SUPER.equals(superscript))
          {
View Full Code Here

          if (TextAttribute.SUPERSCRIPT_SUPER.equals(superscript))
          {
            atrans = new AffineTransform();
            atrans.scale(2 / 3d, 2 / 3d);
            atrans.translate(0, - awtFont.getSize() / 2f);
            awtFont = awtFont.deriveFont(atrans);
          }
          else if (TextAttribute.SUPERSCRIPT_SUB.equals(superscript))
          {
            atrans = new AffineTransform();
            atrans.scale(2 / 3d, 2 / 3d);
View Full Code Here

          else if (TextAttribute.SUPERSCRIPT_SUB.equals(superscript))
          {
            atrans = new AffineTransform();
            atrans.scale(2 / 3d, 2 / 3d);
            atrans.translate(0, awtFont.getSize() / 2f);
            awtFont = awtFont.deriveFont(atrans);
          }
          awtAttributedString.addAttribute(TextAttribute.FONT, awtFont, iterator.getIndex(), runLimit);
        }
       
        iterator.setIndex(runLimit);
View Full Code Here

      // and they are responsible for the drawing as well.
      Font newFont = JRFontUtil.getAwtFontFromBundles(fontName, font.getStyle(), font.getSize(), null, true);
     
      if (newFont != null)
      {
        return newFont.deriveFont(font.getAttributes());
      }
    }
   
    return obj;
  }
View Full Code Here

        /** Sets the font of the name entry field. */
        protected void setNameFontItalic(boolean italic) {
                Font f = m_name.getFont();
                if (f.isItalic() != italic) {
                        f = f.deriveFont(italic ? Font.ITALIC : Font.PLAIN);
                        m_name.setFont(f);
                }
        }

        /**
 
View Full Code Here

  private ImageProducer iProducer ;

  AboutPanel()
  {
    Font font = loadFont("ASTROLYT.TTF") ;
    font1 = font.deriveFont(Font.BOLD, (float) 14.0) ;
    font2 = font.deriveFont(Font.BOLD, (float) 20.0) ;

    font = loadFont("AUGIE.TTF") ;
    font3 = font.deriveFont(Font.BOLD, (float) 14.0) ;
View Full Code Here

  AboutPanel()
  {
    Font font = loadFont("ASTROLYT.TTF") ;
    font1 = font.deriveFont(Font.BOLD, (float) 14.0) ;
    font2 = font.deriveFont(Font.BOLD, (float) 20.0) ;

    font = loadFont("AUGIE.TTF") ;
    font3 = font.deriveFont(Font.BOLD, (float) 14.0) ;

    versionStr = "Version " + Globals.VERSION ;
View Full Code Here

    Font font = loadFont("ASTROLYT.TTF") ;
    font1 = font.deriveFont(Font.BOLD, (float) 14.0) ;
    font2 = font.deriveFont(Font.BOLD, (float) 20.0) ;

    font = loadFont("AUGIE.TTF") ;
    font3 = font.deriveFont(Font.BOLD, (float) 14.0) ;

    versionStr = "Version " + Globals.VERSION ;
    buildStr = " build " + Globals.BUILD ;

    image = new ImageIcon(getClass().getResource("/images/autumn.png"));
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.