# Fortran vector graphics library (FIG)

**URL:** <https://fortran-lang.discourse.group/t/fortran-vector-graphics-library-fig/8597>\
**Category:** GSoC-2024\
**Created:** [September 13, 2024, 11:15am UTC](https://fortran-lang.discourse.group/t/fortran-vector-graphics-library-fig/8597 "2024-09-13T11:15:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ezz](https://avatars.discourse-cdn.com/v4/letter/e/c67d28/32.png) [@ezz](https://fortran-lang.discourse.group/u/ezz)\
**Post date:** [September 13, 2024, 11:15am UTC](https://fortran-lang.discourse.group/t/fortran-vector-graphics-library-fig/8597/1 "2024-09-13T11:15:41Z")

</div>

Hello,

Over the last few months, I have been working on a vector graphics library written in Fortran. The library is now in a usable state and supports a variety of shapes, paths, and text, with output options including PNG, PPM, and SVG.

## Features

- **Shape Drawing** : Easily draw paths, shapes, and curves.

- **Styling** : Apply stroking, dashing, and other styles to shapes.

- **Text Support** : Render fonts and text with customizable attributes.

- **Export Options** : Save your graphics in PNG, PPM, or SVG formats.

[https://github.com/AnonMiraj/fig](https://github.com/AnonMiraj/fig)

My future plans include continuing work on `fig-plot` in my free time. I aim to reach a state where you can create high-quality plots (2D plots, bar plots, and histograms) directly in Fortran. I will provide an update once I reach a significant milestone.  
[https://github.com/AnonMiraj/fig-plot](https://github.com/AnonMiraj/fig-plot)

### TODOs for `fig`

- **Additional Backend Support** : Introduce an alternative backend to make Cairo an optional dependency. Although developing a pure Fortran backend is possible, it will require a lot of effort.

- **Gradients and Transformations**

- **Graphics Driver Support** : Integration a graphics driver like OpenGL.

I can’t wait to receive feedback on the library and look forward to potential contributions that will further improve the library.

A special thanks to @federicoperini, @everythingfunctional, and @Jweber for their invaluable assistance and encouragement throughout this journey. Their support was crucial in bringing this library to life.

 ![tri_plot](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/c/c4a80d5b21f4a6c5219e428988efe53e78105ebb.png)  
 ![image](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/f/fb284bb2318b34c64e8f8b4bba539ed13ca41142.png)
