Examples of FontFamily


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

    Arrays.sort(families);
    for (int i = 0; i < families.length; i++)
    {
      final String family = families[i];
      writer.writeTag(null, "font-family", "name", family, false);
      final FontFamily fontFamily = registry.getFontFamily(family);
      writeRecord(writer, false, false, fontFamily.getFontRecord(false, false), records);
      writeRecord(writer, true, false, fontFamily.getFontRecord(true, false), records);
      writeRecord(writer, false, true, fontFamily.getFontRecord(false, true), records);
      writeRecord(writer, true, true, fontFamily.getFontRecord(true, true), records);
      writer.writeCloseTag();
    }

    final FontContext context = new DefaultFontContext(1000, false, true, false, "Identity-H");
    final FontMetricsFactory metricsFactory = itextRegistry.createMetricsFactory();
View Full Code Here

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

    registry.initialize();
    final String[] fontFamilies = registry.getRegisteredFamilies();
    for (int i = 0; i < fontFamilies.length; i++)
    {
      final String fontFamily = fontFamilies[i];
      final FontFamily family = registry.getFontFamily(fontFamily);
      //final String[] names = family.getAllNames();
      printRecord(family.getFontRecord(false, false));
      printRecord(family.getFontRecord(true, false));
      printRecord(family.getFontRecord(false, true));
      printRecord(family.getFontRecord(true, true));
    }
  }
View Full Code Here

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

    tfr.registerDefaultFontPath();
    final int length = names.length;
    for (int i = 0; i < length; i++)
    {
      final String name = names[i];
      final FontFamily fofam = tfr.getFontFamily(name);
      if ("AmerType Md BT".equals(name))
      {
        final FontSource fr = (FontSource) fofam.getFontRecord(false, false);
        final ResourceManager resourceManager = new ResourceManager();
        resourceManager.registerDefaults();

        final ResourceKey fontSource = resourceManager.createKey(new File(fr.getFontSource()));
        final FontDataInputSource fs =
View Full Code Here

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

    if (name == null)
    {
      return getDefaultFontFamily();
    }

    final FontFamily ff = fontStorage.getFontRegistry().getFontFamily(name);
    if (ff != null)
    {
      return ff;
    }
    return getDefaultFontFamily();
View Full Code Here

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

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

    {
      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;
    }
    // todo
    final DefaultFontContext fontContext =
        new DefaultFontContext (this, spec.isAntiAliasing(), spec.getFontSize(), "UTF-8", false);

    final FontRecord record = family.getFontRecord
            (spec.getFontWeight() > 600, spec.isItalic() || spec.isOblique());
    final FontMetrics fm = getFontStorage().getFontMetrics
            (record.getIdentifier(), fontContext);
    if (fm == null)
    {
View Full Code Here

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

            (new String[alternateFamilyNames.size()]);
  }

  public FontFamily getFontFamily(final String name)
  {
    final FontFamily primary = (FontFamily) this.fontFamilies.get(name);
    if (primary != null)
    {
      return primary;
    }
    final FontFamily secondary = (FontFamily)
            this.alternateFamilyNames.get(name);
    if (secondary != null)
    {
      return secondary;
    }
View Full Code Here

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

   * @param name
   * @return the font family or null, if there is no such family.
   */
  public FontFamily getFontFamily(final String name)
  {
    final FontFamily fontFamily = (FontFamily) fontFamilies.get(name);
    if (fontFamily != null)
    {
      return fontFamily;
    }
    return fallback;
View Full Code Here

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

            (new String[alternateFamilyNames.size()]);
  }

  public FontFamily getFontFamily(final String name)
  {
    final FontFamily primary = (FontFamily) this.fontFamilies.get(name);
    if (primary != null)
    {
      return primary;
    }
    final FontFamily secondary = (FontFamily)
            this.alternateFamilyNames.get(name);
    if (secondary != null)
    {
      return secondary;
    }
View Full Code Here

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

    registry.initialize();
    final String[] fontFamilies = registry.getRegisteredFamilies();
    for (int i = 0; i < fontFamilies.length; i++)
    {
      final String fontFamily = fontFamilies[i];
      final FontFamily family = registry.getFontFamily(fontFamily);
      //final String[] names = family.getAllNames();
      printRecord(family.getFontRecord(false, false));
      printRecord(family.getFontRecord(true, false));
      printRecord(family.getFontRecord(false, true));
      printRecord(family.getFontRecord(true, true));
    }
  }
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.