Examples of FontKey


Examples of net.sf.jasperreports.engine.export.FontKey

     * @throws JRException
     */
    public byte[] getPdf() throws JRException {
       
        Map fontMap = new HashMap();
        fontMap.put(new FontKey("Arial", true, false), new PdfFont("Helvetica-Bold", "Cp1252", false));
        fontMap.put(new FontKey("Arial", false, true), new PdfFont("Helvetica-Oblique", "Cp1252", false));
        fontMap.put(new FontKey("Arial", true, true), new PdfFont("Helvetica-BoldOblique", "Cp1252", false));
        fontMap.put(new FontKey("Comic Sans MS", false, false), new PdfFont("COMICBD.TTF", "Cp1252", true));
       
        ByteArrayOutputStream out = new ByteArrayOutputStream();
       
        JRPdfExporter exporter = new JRPdfExporter();
        exporter.setParameter(JRExporterParameter.JASPER_PRINT, this.getJasperPrint());
View Full Code Here

Examples of org.jfree.fonts.registry.FontKey

    this.baseFontSupport = new BaseFontSupport(registry);
  }

  public ITextFontStorage(final ITextFontRegistry registry)
  {
    this.lookupKey = new FontKey();
    this.knownMetrics = new HashMap();
    this.registry = registry;
    this.baseFontSupport = new BaseFontSupport(registry);
  }
View Full Code Here

Examples of org.jfree.fonts.registry.FontKey

    this.baseFontSupport = new BaseFontSupport(registry);
  }

  public ITextFontStorage(final ITextFontRegistry registry, final String encoding)
  {
    this.lookupKey = new FontKey();
    this.knownMetrics = new HashMap();
    this.registry = registry;
    this.baseFontSupport = new BaseFontSupport(registry, encoding);
  }
View Full Code Here

Examples of org.jfree.fonts.registry.FontKey

    final BaseFont baseFont = baseFontSupport.createBaseFont
        (fontName, bold, italic, context.getEncoding(), context.isEmbedded());

    final FontMetrics metrics = new BaseFontFontMetrics(baseFont, (float) context.getFontSize());
    final FontKey key = new FontKey(rawRecord, context.isAntiAliased(),
        context.isFractionalMetrics(), context.getFontSize());
    knownMetrics.put(key, metrics);
    return metrics;
  }
View Full Code Here

Examples of org.jfree.fonts.registry.FontKey

  private FontKey lookupKey;
  private HashMap knownMetrics;

  public ITextFontStorage()
  {
    this.lookupKey = new FontKey();
    this.knownMetrics = new HashMap();

    this.registry = new ITextFontRegistry();
    this.registry.initialize();
View Full Code Here

Examples of org.pentaho.reporting.libraries.fonts.registry.FontKey

  public CompoundFontStorage()
  {
    this.fontRegistry = new CompoundFontRegistry();
    this.metricsFactories = new HashMap();
    this.firstLevelFontCache = new FirstLevelFontCache(fontRegistry.getSecondLevelCache());
    this.lookupKey = new FontKey();
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.fonts.registry.FontKey

      metricsFactories.put(registry, metricsFactory);
    }

    misses += 1;

    final FontKey key = new FontKey(record, context.isAntiAliased(),
        context.isFractionalMetrics(), context.getFontSize());
    final FontMetrics metrics = metricsFactory.createMetrics(cid.getIdentifier(), context);
    firstLevelFontCache.putFontMetrics(key, metrics);
    return metrics;
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.fonts.registry.FontKey

  public CompoundFontStorage()
  {
    this.fontRegistry = new CompoundFontRegistry();
    this.metricsFactories = new HashMap();
    this.firstLevelFontCache = new FirstLevelFontCache(fontRegistry.getSecondLevelCache());
    this.lookupKey = new FontKey();
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.fonts.registry.FontKey

      metricsFactories.put(registry, metricsFactory);
    }

    misses += 1;

    final FontKey key = new FontKey(record, context.isAntiAliased(),
        context.isFractionalMetrics(), context.getFontSize());
    final FontMetrics metrics = metricsFactory.createMetrics(cid.getIdentifier(), context);
    firstLevelFontCache.putFontMetrics(key, metrics);
    return metrics;
  }
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.