Package org.jfree.fonts.registry

Examples of org.jfree.fonts.registry.FontRecord


      throw new IllegalArgumentException
              ("This identifier does not belong to the AWT-font system.");
    }

    // AWT-FontRecords and AWT-FontIdentifiers are implemented in the same class.
    final FontRecord record = (FontRecord) identifier;

    int style = Font.PLAIN;
    if (record.isBold())
    {
      style |= Font.BOLD;
    }
    if (record.isItalic())
    {
      style |= Font.ITALIC;
    }
    final Font font = new Font(record.getFamily().getFamilyName(), style, (int) context.getFontSize());
    return new AWTFontMetrics(font, context);
  }
View Full Code Here


    }

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

        if (registryFontRecord instanceof CompoundFontRecord)
View Full Code Here

    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;
View Full Code Here

    }
    // 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)
    {
      throw new NullPointerException("FontMetrics returned from factory is null.");
    }
    return fm;
View Full Code Here

      Log.warn("Unable to lookup the font family.");
      return null;
    }
    final DefaultFontContext fontContext = new DefaultFontContext (this, spec.isAntiAliasing(), spec.getFontSize());

    final FontRecord record = family.getFontRecord
            (spec.getFontWeight() > 600, spec.isItalic() || spec.isOblique());
    final FontMetrics fm = getFontStorage().getFontMetrics
            (record.getIdentifier(), fontContext);
    if (fm == null)
    {
      throw new NullPointerException("FontMetrics returned from factory is null.");
    }
    return fm;
View Full Code Here

    if (family == null)
    {
      return null;
    }

    final FontRecord record = family.getFontRecord(bold, italics);
    if (record instanceof TrueTypeFontRecord)
    {
      // yes, thats a bit hacky, but we have to deal with iTexts enforced
      // OS2table requirement here.
      TrueTypeFontRecord ttfRecord = (TrueTypeFontRecord) record;
View Full Code Here

      stringEncoding = "utf-8";
    }

    try
    {
      final FontRecord registryFontRecord =
              baseFontFactory.getFontForName(fontKey, bold, italic);
      if (registryFontRecord != null && builtInFont == false)
      {
        // Try one: We do have a registered TrueType file. The cache is checked
        // first, creating fonts is expensive. If no cached version is found,
View Full Code Here

      throw new IllegalArgumentException
              ("This identifier does not belong to the AWT-font system.");
    }

    // AWT-FontRecords and AWT-FontIdentifiers are implemented in the same class.
    final FontRecord record = (FontRecord) identifier;

    int style = Font.PLAIN;
    if (record.isBold())
    {
      style |= Font.BOLD;
    }
    if (record.isItalic())
    {
      style |= Font.ITALIC;
    }
    final Font font = new Font(record.getFamily().getFamilyName(), style, (int) context.getFontSize());
    return new AWTFontMetrics(font, context);
  }
View Full Code Here

TOP

Related Classes of org.jfree.fonts.registry.FontRecord

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.