<commit_before># Ezo
A small self-contained pixel font.

## Features

 * An extremely small font for low density displays.
 * Two font weights: **bold** and regular.
 * Open, and consistent character shapes for readability.
 * Kerning rules to maximize character density.
 * Covers the printable ASCII character set.
 * A small library with no dependencies.
 * Custom plotting allows any mode of rendering to be supported.
 * A fluent, simple API.

## Sample

![Sampler](https://github.com/tomgibara/ezo/wiki/images/ezo_sampler.png)

More samples are available in the associated [github wiki][0].

## Example

```java
// choose some text to render
String text = "Hello, World!";
// a scale for the rendering to improve visibility
int scale = 8;
// get an instance of the font, bold() is also an option
Ezo ezo = Ezo.regular();
// find out how large the text is
int width = ezo.widthOfString(text);
int height = ezo.ascent() + ezo.descent();
// create a suitably sized image
BufferedImage image = new BufferedImage(
   scale * (width + 2),  // width
   scale * (height + 2), // height
   TYPE_INT_RGB          // type
   );
// create a graphics context
Graphics2D g = image.createGraphics();
// blank the image
g.setColor(Color.WHITE);
g.fillRect(0, 0, image.getWidth(), image.getHeight());
// prepare the graphics context
g.setColor(Color.BLACK);
g.scale(scale, scale);
// now fluently render the text
ezo.renderer((x, y) -> g.fillRect(x, y, 1, 1))
   .locate(1, ezo.ascent() + 1)
   .renderString(text);
// dispose of the graphics
g.dispose();
// save the result
ImageIO.write(image, "PNG", new File("ezo_hello_world.png"));
```
## Usage

The ezo library is currently in development. A future version will be available
from the Maven central repository:

> Group ID:    `com.tomgibara.ezo`
> Artifact ID: `ezo`
> Version:     `1.0.0`

The Maven dependency being:

    <dependency>
      <groupId>com.tomgibara.ezo</groupId>
      <artifactId>ezo</artifactId>
      <version>1.0.0</version>
    </dependency>

## Release History

*This library has not yet been released*

[0]: https://github.com/tomgibara/ezo/wiki<commit_msg>Simplifies example code, with links to further samples.<commit_after># Ezo
A small self-contained pixel font.

## Features

 * An extremely small font for low density displays.
 * Two font weights: **bold** and regular.
 * Open, and consistent character shapes for readability.
 * Kerning rules to maximize character density.
 * Covers the printable ASCII character set.
 * A small library with no dependencies.
 * Custom plotting allows any mode of rendering to be supported.
 * A fluent, simple API.

## Sample

![Sampler](https://github.com/tomgibara/ezo/wiki/images/ezo_sampler.png)

More samples are available in the associated [github wiki][0].

## Example

```java
String text  = ... // the text to render
Graphics2D g = ... // a graphics context to render to
int originX  = ... // x-coordinate of first character
int originY  = ... // y-coordinate of text baseline

Ezo.regular();                                 // get a font instance
   .renderer((x, y) -> g.fillRect(x, y, 1, 1)) // define a plotter
   .locate(originX, originY)                   // position the text
   .renderString(text);                        // render the text
```
A complete [*"Hello, World!"* example][1], with documentation, is available
amongst [other sample code][2].

## Usage

The ezo library is currently in development. A future version will be available
from the Maven central repository:

> Group ID:    `com.tomgibara.ezo`
> Artifact ID: `ezo`
> Version:     `1.0.0`

The Maven dependency being:

    <dependency>
      <groupId>com.tomgibara.ezo</groupId>
      <artifactId>ezo</artifactId>
      <version>1.0.0</version>
    </dependency>

## Release History

*This library has not yet been released*

[0]: https://github.com/tomgibara/ezo/wiki
[1]: https://github.com/tomgibara/ezo/blob/master/src/test/java/com/tomgibara/ezo/EzoHelloWorld.java
[2]: https://github.com/tomgibara/ezo/blob/master/src/test/java/com/tomgibara/ezo/
{'fraction_non_alphanumeric': 0.12438302073050346, 'fraction_numerical': 0.008144126357354392, 'mean_word_length': 3.358064516129032, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 27, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1806487', 'n_tokens_mistral': 1300, 'n_tokens_neox': 1246, 'n_words': 430}