Package org.jfree.fonts.merge

Examples of org.jfree.fonts.merge.CompoundFontIdentifier


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

    final CompoundFontIdentifier compoundFontIdentifier;
    final FontIdentifier record;
    if (rawRecord instanceof CompoundFontIdentifier)
    {
      compoundFontIdentifier = (CompoundFontIdentifier) rawRecord;
      record = compoundFontIdentifier.getIdentifier();
    }
    else
    {
      record = rawRecord;
      compoundFontIdentifier = null;
    }

    final String fontName;
    final boolean bold;
    final boolean italic;
    if (record instanceof FontRecord)
    {
      final FontRecord fontRecord = (FontRecord) record;
      fontName = fontRecord.getFamily().getFamilyName();
      if (compoundFontIdentifier != null)
      {
        bold = compoundFontIdentifier.isBoldSpecified();
        italic = compoundFontIdentifier.isItalicsSpecified();
      }
      else
      {
        bold = fontRecord.isBold();
        italic = fontRecord.isItalic();
      }
    }
    else if (record instanceof TrueTypeFontIdentifier)
    {
      final TrueTypeFontIdentifier ttfFontRecord = (TrueTypeFontIdentifier) record;
      fontName = ttfFontRecord.getFontName();
      if (compoundFontIdentifier != null)
      {
        bold = compoundFontIdentifier.isBoldSpecified();
        italic = compoundFontIdentifier.isItalicsSpecified();
      }
      else
      {
        bold = false;
        italic = false;
View Full Code Here

TOP

Related Classes of org.jfree.fonts.merge.CompoundFontIdentifier

Copyright © 2018 www.massapicom. 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.