GDL (Graphic Design Library) is a high-performance Rust 2D graphic design library, allowing developers to create 2D graphics and resize them for various social media platforms.
GDL allows you to create:
- Image collages
- Social media graphics
- Banners
- Adverts
See examples of designs created with GDL here.
Documentation can be found here.
Clone this repo:
git clone https://github.com/silvia-odwyer/gdl
Run the binary, which will create a sample graphic:
cd crate
cargo run --release
See /examples for more examples.
If you'd like to use your own custom fonts, which are TrueType fonts (those with a *.ttf file extension), follow these steps:
- Navigate to the
fonts
directory, which can be found inside thecrates
dir.
cd crate/fonts
-
Insert the font's TTF file into this directory, ie:
crate/fonts
. -
When drawing text and you need to pass a font name into the function, use the name of the font found in the filename.
For example, if the custom font is called Robotika.ttf then pass the name Robotika into the function.
This does not attempt to be a full-fledged graphic design solution, but rather an aid to those who want to create graphics-on-the-fly quickly and in large quantities. Designing batches of graphics for large numbers of blog posts can be quite cumbersome for bloggers and freelance writers. Hence why I started working on this library.
This is a work-in-progress, therefore the API will likely break in future versions until it reaches 1.0.0.
The WebAssembly version of this library will make use of the browser's canvas, for graphic creation in the browser.
UPDATE [Dec, 2019]: Development has commenced on the WebAssembly version of this library, and is expected to be completed by end of January 2020.