Examples of deriveFont()


Examples of java.awt.Font.deriveFont()

      else if (textattribute.equals(TextAttribute.WEIGHT))
      {
        final Font font = getFont();
        final Map fontAttributes = font.getAttributes();
        fontAttributes.put(TextAttribute.WEIGHT, iter.getAttributes().get(textattribute));
        setFont(font.deriveFont(fontAttributes));
      }
    }
  }

  /**
 
View Full Code Here

Examples of java.awt.Font.deriveFont()

        if (awtFont == null)
        {
          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);
      }
    }
   
View Full Code Here

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

Examples of java.awt.Font.deriveFont()

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

Examples of java.awt.Font.deriveFont()

          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

Examples of java.awt.Font.deriveFont()

          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

Examples of java.awt.Font.deriveFont()

          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

Examples of java.awt.Font.deriveFont()

      // 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

Examples of java.awt.Font.deriveFont()

        /** 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

Examples of java.awt.Font.deriveFont()

  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
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.