Package org.apache.flex.forks.batik.svggen.font

Examples of org.apache.flex.forks.batik.svggen.font.Font


        if (path != null)
        {
            try
            {
              // Use Batik to load the Font
              Font font = Font.create(path);

                if (font != null)
                {
                  FSType type = FSType.getFSType(font);
                  if (! type.usableByFlex)
                  {
                    throw new UnusableFontLicense(location + "", type.description);
                  }
                  String copyright = font.getNameTable().getRecord(Table.nameCopyrightNotice);
                  String trademark = font.getNameTable().getRecord(Table.nameTrademark);

                    // BatikFontManager will try to work out the real
                    // style from the sub family name and update the
                    // style property...
                    BatikFontFace fontFace = new BatikFontFace(font, 0,
View Full Code Here


        }
      }
    }
    else
    {
      Font font = null;
      String err = null;
      try
      {
        font = Font.create(file.toString());
      }
      catch(Exception e)
      {
        err = e.toString();
      }

      if (font == null || font.getOS2Table() == null || font.getNameTable() == null)
      {
        System.err.println("Error reading " + file + ": " + err);
      }
      else
      {
        Os2Table os2Table = font.getOS2Table();
        int fsType = os2Table.getLicenseType();

        NameTable name = font.getNameTable();
        String copyright = name.getRecord(Table.nameCopyrightNotice);
        String trademark = name.getRecord(Table.nameTrademark);

        String postScriptName = name.getRecord(Table.namePostscriptName);
        LocalFont localFont = new LocalFont(postScriptName, path, fsType, copyright, trademark);
View Full Code Here

        }
      }
    }
    else
    {
      Font font = null;
      String err = null;
      try
      {
        font = Font.create(file.toString());
      }
      catch(Exception e)
      {
        err = e.toString();
      }

      if (font == null || font.getOS2Table() == null)
      {
        System.err.println("Error reading " + file + ": " + err);
      }
      else
      {
        Os2Table table = font.getOS2Table();
        Integer integ = new Integer(table.getLicenseType());
        ArrayList<String> list = fonts.get(integ);
        if (list == null)
        {
          list = new ArrayList<String>();
View Full Code Here

TOP

Related Classes of org.apache.flex.forks.batik.svggen.font.Font

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.