/fontmetrics

Light support for Font Metrics, SVG and Java

Primary LanguageJavaApache License 2.0Apache-2.0

FontMetrics

This repo is a light port to Java of anafanafo, which computes text width for 110 pt Verdana. Built with MavenBadges in mind.

Usage

final SimpleFontMetrics metrics = SimpleFontMetrics.getInstance();
final int width = metrics.widthOf("Hello World!");

MAVEN

Add dependency to your pom.xml:

<dependency>
    <groupId>org.javastack</groupId>
    <artifactId>fontmetrics</artifactId>
    <version>1.1.0</version>
</dependency>

License

All rights to Verdana are owned by Microsoft Corp.

The remainder of this project is licensed under the Apache-2.0 License.


Inspired in anafanafo, this code is Java-minimalistic version.