1
0
Fork 0
A hvif rendered in modern standard C without extra dependencies.
Go to file
Hans-Joerg Schurr 1820b7217b Move some transform related enums 2021-06-05 23:14:27 +02:00
docs Update README 2020-05-30 22:04:53 +02:00
m4 Add build system 2020-02-21 19:12:20 +01:00
src Move some transform related enums 2021-06-05 23:14:27 +02:00
.clang-format Add configuration files for dev environment 2020-02-21 18:50:27 +01:00
.gitignore Add ccls-cache to gitignore 2021-06-05 23:14:24 +02:00
LICENSE License under MIT license 2020-05-29 20:40:43 +02:00
Makefile.am Simplify buildsystem 2020-05-30 21:47:13 +02:00
README.md Update README 2021-04-24 23:36:24 +02:00
configure.ac Bump version to 0.1.0 2020-05-30 22:07:26 +02:00
shell.nix Change buildsystem to build a library 2020-05-29 23:27:03 +02:00

README.md

A simple library to render Haiku Vector Icons

⚠️ Do not use this library. It is not ready yet.

The Haiku operating system uses a custom format to represent vector icons. The Haiku Vector Icon Format (hvif) is optimized to create tiny files that can be saved with the file metadata. For a good technical overview of the format see this blog post by Leah Hanson. The goal of this library is to allow the usage of this format independent of the Haiku ecosystem. The best way to create new icons is to use the Icon-O-Matic tool that ships with Haiku.

The library is written in modern standard C and MIT licensed. When finished it will feature a parser and and serializer for hvif files without any dependencies beyond libc and multiple simple backends. Furthermore, a toy tool to convert hvif files into png files is included.

The author is not associated with the Haiku project.

Current Status

The library is currently under active development. The current parser should be able to parse hvif files created with current Haiku builds, but is mostly untested. There is an experimental rasterizer based on cairo is included. The purpose of this rasterizer is testing. It is not feature complete, but renders most real world icons reasonably well.

Example

The File_GoogleFS icon from the Haiku distribution as rendered by Haiku:

and as rendered with the current cairo based rasterizer:

While not perfect, the result is quite decent.

Building

Release Distribution

The build system is standard auto tools. When downloading a release distribution the usual

$ ./configure
$ make -j

and make install as root should work. Beside a recent C compiler and pkg-config the cairo library is required for now. Since no sensible functionality independent of cairo is implemented as of now, cairo is a hard dependency.

Development

To compile a freshly cloned repository run:

$ autoreconf -i
$ ./configure
$ make -j

On NixOS the included shell.nix script can be used to bring the dependencies and a couple of development tools into scope.

Documentation

HTML documentation can be generated with make html if Doxygen is installed.

Contribution

Contributions are very welcome. Please send patches or bugreports to commits at schurr dot at. If you are unfamiliar with the Email based git workflow, see this excellent tutorial.