Examples of FontInfo


Examples of ae.sun.java2d.loops.FontInfo

public abstract class GlyphListPipe implements TextPipe {

    public void drawString(SunGraphics2D sg2d, String s,
                           double x, double y)
    {
        FontInfo info = sg2d.getFontInfo();
        if (info.pixelHeight > OutlineTextRenderer.THRESHHOLD) {
            SurfaceData.outlineTextRenderer.drawString(sg2d, s, x, y);
            return;
        }
View Full Code Here

Examples of net.sf.jasperreports.engine.fonts.FontInfo

    {
      pdfFont = (PdfFont) fontMap.get(key);
    }
    else
    {
      FontInfo fontInfo = JRFontUtil.getFontInfo(jrFont.getFontName(), locale);
      if (fontInfo == null)
      {
        //fontName NOT found in font extensions
        pdfFont = new PdfFont(jrFont.getPdfFontName(), jrFont.getPdfEncoding(), jrFont.isPdfEmbedded());
      }
      else
      {
        //fontName found in font extensions
        FontFamily family = fontInfo.getFontFamily();
        FontFace face = fontInfo.getFontFace();
        int faceStyle = java.awt.Font.PLAIN;

        if (face == null)
        {
          //fontName matches family name in font extension
          if (jrFont.isBold() && jrFont.isItalic())
          {
            face = family.getBoldItalicFace();
            faceStyle = java.awt.Font.BOLD | java.awt.Font.ITALIC;
          }
         
          if (face == null && jrFont.isBold())
          {
            face = family.getBoldFace();
            faceStyle = java.awt.Font.BOLD;
          }
         
          if (face == null && jrFont.isItalic())
          {
            face = family.getItalicFace();
            faceStyle = java.awt.Font.ITALIC;
          }
         
          if (face == null)
          {
            face = family.getNormalFace();
            faceStyle = java.awt.Font.PLAIN;
          }
           
//          if (face == null)
//          {
//            throw new JRRuntimeException("Font family '" + family.getName() + "' does not have the normal font face.");
//          }
        }
        else
        {
          //fontName matches face name in font extension; not family name
          faceStyle = fontInfo.getStyle();
        }
       
        String pdfFontName = null;
        int pdfFontStyle = java.awt.Font.PLAIN;
        if (jrFont.isBold() && jrFont.isItalic())
View Full Code Here

Examples of net.sf.jasperreports.engine.fonts.FontInfo

      FontFamily family = (FontFamily)itf.next();
      if (locale == null || family.supportsLocale(locale))
      {
        if (name.equals(family.getName()))
        {
          return new FontInfo(family, null, Font.PLAIN);
        }
        FontFace face = family.getNormalFace();
        if (face != null && name.equals(face.getName()))
        {
          return new FontInfo(family, face, Font.PLAIN);
        }
        face = family.getBoldFace();
        if (face != null && name.equals(face.getName()))
        {
          return new FontInfo(family, face, Font.BOLD);
        }
        face = family.getItalicFace();
        if (face != null && name.equals(face.getName()))
        {
          return new FontInfo(family, face, Font.ITALIC);
        }
        face = family.getBoldItalicFace();
        if (face != null && name.equals(face.getName()))
        {
          return new FontInfo(family, face, Font.BOLD | Font.ITALIC);
        }
      }
    }
    //throw new JRRuntimeException("Font family/face named '" + name + "' not found.");
    return null;
View Full Code Here

Examples of net.sf.jasperreports.engine.fonts.FontInfo

   *
   */
  public static Font getAwtFontFromBundles(String name, int style, int size, Locale locale, boolean ignoreMissingFont)
  {
    Font awtFont = null;
    FontInfo fontInfo = getFontInfo(name, locale);
   
    if (fontInfo != null)
    {
      int faceStyle = Font.PLAIN;
      FontFamily family = fontInfo.getFontFamily();
      FontFace face = fontInfo.getFontFace();
      if (face == null)
      {
        if (((style & Font.BOLD) > 0) && ((style & Font.ITALIC) > 0))
        {
          face = family.getBoldItalicFace();
          faceStyle = Font.BOLD | Font.ITALIC;
        }
       
        if (face == null && ((style & Font.BOLD) > 0))
        {
          face = family.getBoldFace();
          faceStyle = Font.BOLD;
        }
       
        if (face == null && ((style & Font.ITALIC) > 0))
        {
          face = family.getItalicFace();
          faceStyle = Font.ITALIC;
        }
       
        if (face == null)
        {
          face = family.getNormalFace();
          faceStyle = Font.PLAIN;
        }
         
//        if (face == null)
//        {
//          throw new JRRuntimeException("Font family '" + family.getName() + "' does not have the normal font face.");
//        }
      }
      else
      {
        faceStyle = fontInfo.getStyle();
      }

      if (face == null)
      {
        // The font family does not specify any font face, not even a normal one.
View Full Code Here

Examples of net.sf.jasperreports.engine.fonts.FontInfo

    {
      fontFamily = (String) fontMap.get(fontFamilyAttr);
    }
    else
    {
      FontInfo fontInfo = JRFontUtil.getFontInfo(fontFamilyAttr, locale);
      if (fontInfo != null)
      {
        //fontName found in font extensions
        FontFamily family = fontInfo.getFontFamily();
        String exportFont = family.getExportFont(exporterKey);
        if (exportFont != null)
        {
          fontFamily = exportFont;
        }
View Full Code Here

Examples of net.sf.jasperreports.engine.fonts.FontInfo

    {
      fontFamily = (String) fontMap.get(fontFamilyAttr);
    }
    else
    {
      FontInfo fontInfo = JRFontUtil.getFontInfo(fontFamilyAttr, locale);
      if (fontInfo != null)
      {
        //fontName found in font extensions
        FontFamily family = fontInfo.getFontFamily();
        String exportFont = family.getExportFont(getExporterKey());
        if (exportFont != null)
        {
          fontFamily = exportFont;
        }
View Full Code Here

Examples of net.sf.jasperreports.engine.fonts.FontInfo

        {
          fontName = (String) fontMap.get(fontName);
        }
        else
        {
          FontInfo fontInfo = JRFontUtil.getFontInfo(fontName, locale);
          if (fontInfo != null)
          {
            //fontName found in font extensions
            FontFamily family = fontInfo.getFontFamily();
            String exportFont = family.getExportFont(getExporterKey());
            if (exportFont != null)
            {
              fontName = exportFont;
            }
View Full Code Here

Examples of net.sf.jasperreports.engine.fonts.FontInfo

    {
      fontName = (String) fontMap.get(fontName);
    }
    else
    {
      FontInfo fontInfo = JRFontUtil.getFontInfo(fontName, locale);
      if (fontInfo != null)
      {
        //fontName found in font extensions
        FontFamily family = fontInfo.getFontFamily();
        String exportFont = family.getExportFont(exporterKey);
        if (exportFont != null)
        {
          fontName = exportFont;
        }
      }
    }
   
    XlsxFontInfo fontInfo = new XlsxFontInfo(gridCell, fontName);
    Integer fontIndex = (Integer)fontCache.get(fontInfo.getId());
    if (fontIndex == null)
    {
      fontIndex = Integer.valueOf(fontCache.size());
      export(fontInfo);
      fontCache.put(fontInfo.getId(), fontIndex);
    }
    return fontIndex.intValue();
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.fonts.FontInfo

      {
        fontFamily = (String) fontMap.get(fontFamilyAttr);
      }
      else
      {
        FontInfo fontInfo = JRFontUtil.getFontInfo(fontFamilyAttr, locale);
        if (fontInfo != null)
        {
          //fontName found in font extensions
          FontFamily family = fontInfo.getFontFamily();
          String exportFont = family.getExportFont(exporterKey);
          if (exportFont != null)
          {
            fontFamily = exportFont;
          }
View Full Code Here

Examples of net.sf.jasperreports.engine.fonts.FontInfo

      {
        fontFamily = (String) fontMap.get(fontFamilyAttr);
      }
      else
      {
        FontInfo fontInfo = JRFontUtil.getFontInfo(fontFamilyAttr, locale);
        if (fontInfo != null)
        {
          //fontName found in font extensions
          FontFamily family = fontInfo.getFontFamily();
          String exportFont = family.getExportFont(exporterKey);
          if (exportFont != null)
          {
            fontFamily = exportFont;
          }
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.