Examples of FontFamily


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

      }
    }

    try
    {
      final FontFamily registryFontFamily = registry.getFontFamily(fontKey);
      FontRecord registryFontRecord = null;
      if (registryFontFamily != null)
      {
        registryFontRecord = registryFontFamily.getFontRecord(bold, italic);

        if (registryFontRecord instanceof CompoundFontRecord)
        {
          final CompoundFontRecord cfr = (CompoundFontRecord) registryFontRecord;
          registryFontRecord = cfr.getBase();
View Full Code Here

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

      {
        final CSSValue item = list.getItem(i);
        if (item instanceof CSSConstant)
        {
          final CSSConstant c = (CSSConstant) lookupValue((CSSConstant) item);
          final FontFamily family = outputMetaData.getFontFamilyForGenericName(c);
          fs.setFontFamily(family.getFamilyName());
          if (process.getOutputMetaData().isValid(fs))
          {
            return;
          }
          // Ignore, although this is not ok.
          DebugLog.log ("Invalid state after setting predefined font family.");
        }
        else if (item instanceof CSSStringValue)
        {
          final CSSStringValue sval = (CSSStringValue) item;
          final String fontName = sval.getValue();
          fs.setFontFamily(fontName);
          if (process.getOutputMetaData().isValid(fs))
          {
            return;
          }
        }
      }
    }
    else if (cssValue instanceof CSSConstant)
    {
      if (FontFamilyValues.NONE.equals(cssValue))
      {
        fs.setFontFamily(null);
        return;
      }
    }

    final FontFamily family = outputMetaData.getDefaultFontFamily();
    fs.setFontFamily(family.getFamilyName());
    if (process.getOutputMetaData().isValid(fs) == false)
    {
      throw new IllegalStateException
              ("Invalid state after setting the default font family.");
    }
View Full Code Here

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

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