Git Product home page Git Product logo

aspose.font-for-java's Introduction

Java API for Various Font Formats

Aspose.Font for Java is a font loading and drawing library. It supports multiple front formats such as TrueType (with TrueType collectons), CFF, OpenType, and Type1. The API provides rich functionality to load/save font and provide information about its data structures along with any glyph that is supported by all the font types. It also provides encoding information for all the font types which represents a mapping between character codes and glyph identifiers. Its rendering subsystem helps end-users to render any desired glyph or text. Special glyphs can be rendered by implementing interface using simple graphics functionality (move point, draw line, curve).

Directory Description
Examples A collection of Java examples that help you learn the product features.

Font API Features

  • Load font files from disc as well as stream.
  • Read font information and save updated font files to disc.
  • Support for TrueType and OpenType Fonts.
  • Load TrueType Font types from locally stored files, update parameters and save.
  • Work with Glyphs and Metrics of TrueType Fonts.
  • Render text using TrueType and Type1 font.
  • Detect Latin Symbols in Fonts.
  • Load and extract data from Type1 Font stored at the local disc.
  • Work with Glyphs and Metrics of Type1 Fonts.
  • Render text using custom interfaces.

For a more comprehensive list of features, please visit Feature Overview.

Read & Write Font Formats

TTF

Read Font Formats

TTC, OpenType, CFF, Type1

Supported Environments

  • Microsoft Windows: Windows Desktop & Server (x86, x64), Windows Azure
  • macOS: Mac OS X
  • Linux: Ubuntu, CentOS, and others
  • Java Versions: J2SE 8.0 (1.8) or above.

Get Started with Aspose.Font for Java

Aspose hosts all Java APIs at the Aspose Repository. You can easily use Aspose.Font for Java API directly in your Maven projects with simple configurations. For the detailed instructions please visit Installing Aspose.Font for Java from Maven Repository documentation page.

Detect Latin Symbols Support in the Font using Java

// For complete examples and data files, please go to https://github.com/aspose-font/Aspose.Font-for-Java
String fileName = Utils.getDataDir() + "Montserrat-Regular.ttf"; //Font file name with full path

      FontDefinition fd = new FontDefinition(FontType.TTF, new FontFileDefinition("ttf", new FileSystemStreamSource(fileName)));
      TtfFont ttfFont = (TtfFont) Font.open(fd);

      boolean latinText = true;


      for (int code = 65; code < 123; code++)
      {
          GlyphId gid = ttfFont.getEncoding().decodeToGid(code);
          if (gid == null || gid == GlyphUInt32Id.getNotDef())
          {
              latinText = false;
          }
      }

      if (latinText)
      {
          System.out.println(MessageFormat.format("Font {0} supports latin symbols.", ttfFont.getFontName()));
      }
      else
      {
      	System.out.println(MessageFormat.format("Latin symbols are not supported by font {0}.", ttfFont.getFontName()));
      }

Product Page | Docs | API Reference | Examples | Blog | Search | Free Support | Temporary License

aspose.font-for-java's People

Contributors

farooqsheikhpk avatar kashifiqb avatar saudaspose avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.