Examples of FontRegistry


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

    if (cached != null)
    {
      return cached;
    }

    final FontRegistry registry = getFontRegistry();
    FontFamily family = registry.getFontFamily(fontFamily);
    if (family == null)
    {
      AbstractOutputProcessorMetaData.logger.warn("Unable to lookup the font family: " + fontFamily);

      // Get the default font name
      final String fallBack = getNormalizedFontFamilyName(null);
      if (fallBack == null)
      {
        // If this case happens, the output-processor meta-data does not provide a sensible
        // fall-back value. As we cannot continue without a font, we fail here instead of
        // waiting for a NullPointer or other weird error later.
        throw new IllegalArgumentException("No default family defined, aborting.");
      }

      family = registry.getFontFamily(fallBack);
      if (family == null)
      {
        // If this case happens, the output-processor meta-data does not provide a sensible
        // fall-back value. As we cannot continue without a font, we fail here instead of
        // waiting for a NullPointer or other weird error later.
View Full Code Here

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

    return "print";
  }

  public boolean isValid(final FontSpecification spec)
  {
    final FontRegistry registry = getFontRegistry();
    final String fontFamily = spec.getFontFamily();
    if (fontFamily == null)
    {
      return false;
    }
    final FontFamily family = registry.getFontFamily(fontFamily);
    return family != null;

  }
View Full Code Here

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

    if (fontFamily == null)
    {
      DebugLog.log("No font family specified.");
      return null;
    }
    final FontRegistry registry = getFontRegistry();
    final FontFamily family = registry.getFontFamily(fontFamily);
    if (family == null)
    {
      DebugLog.log("Unable to lookup the font family.");
      return null;
    }
View Full Code Here

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

  public StreamingHtmlOutputProcessor(final Configuration configuration)
  {
    super(configuration);

    final FontRegistry fontRegistry = new AWTFontRegistry();
    final FontStorage fontStorage = new DefaultFontStorage(fontRegistry);
    this.metaData = new HtmlOutputProcessorMetaData
        (fontStorage, HtmlOutputProcessorMetaData.PAGINATION_NONE);

    final ContentLocation contentLocation = new DummyRepository().getRoot();
View Full Code Here

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

  public FlowHtmlOutputProcessor(final Configuration configuration, final HtmlPrinter printer)
  {
    super(configuration);

    final FontRegistry fontRegistry = new AWTFontRegistry();
    final FontStorage fontStorage = new DefaultFontStorage(fontRegistry);
    this.metaData = new HtmlOutputProcessorMetaData
        (fontStorage, HtmlOutputProcessorMetaData.PAGINATION_MANUAL);

    this.printer = printer;
View Full Code Here

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

  public PageableHtmlOutputProcessor(final Configuration configuration)
  {
    super(configuration);
    this.flowSelector = new AllPageFlowSelector(true);

    final FontRegistry fontRegistry = new AWTFontRegistry();
    final FontStorage fontStorage = new DefaultFontStorage(fontRegistry);
    this.metaData = new HtmlOutputProcessorMetaData
        (fontStorage, HtmlOutputProcessorMetaData.PAGINATION_FULL);

View Full Code Here

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

  public void initialize()
  {
    for (int i = 0; i < registries.size(); i++)
    {
      final FontRegistry fontRegistry = (FontRegistry) registries.get(i);
      fontRegistry.initialize();
    }
  }
View Full Code Here

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

  public FontFamily getFontFamily(final String name)
  {
    for (int i = 0; i < registries.size(); i++)
    {
      final FontRegistry fontRegistry = (FontRegistry) registries.get(i);
      final FontFamily fontFamily = fontRegistry.getFontFamily(name);
      if (fontFamily != null)
      {
        return new CompoundFontFamily(fontFamily, fontRegistry);
      }
    }
View Full Code Here

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

  {
    final HashSet registeredFamilies = new HashSet();

    for (int i = 0; i < registries.size(); i++)
    {
      final FontRegistry fontRegistry = (FontRegistry) registries.get(i);
      final String[] fontFamilies = fontRegistry.getRegisteredFamilies();
      final int length = fontFamilies.length;
      for (int j = 0; j < length; j++)
      {
        final String fontFamily = fontFamilies[j];
        registeredFamilies.add(fontFamily);
View Full Code Here

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

    final HashSet registeredFamilies = new HashSet();

    final int registryCount = registries.size();
    for (int i = 0; i < registryCount; i++)
    {
      final FontRegistry fontRegistry = (FontRegistry) registries.get(i);
      final String[] fontFamilies = fontRegistry.getAllRegisteredFamilies();
      final int familyCount = fontFamilies.length;
      for (int j = 0; j < familyCount; j++)
      {
        final String fontFamily = fontFamilies[j];
        registeredFamilies.add(fontFamily);
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.