For API documentation and usage, please refer to the [Cairo](https://www.cairographics.org/) documentation for now.
-### Current status:
+<p align="center">
+ <a href="https://github.com/jpbruyere/vkvg/blob/master/vkvg-tiger.png">
+ <kbd><img src="https://github.com/jpbruyere/vkvg/blob/master/vkvg-tiger.png" height="260"></kbd>
+ </a>
+ <a href="https://github.com/jpbruyere/vkvg/blob/master/screenshot1.png">
+ <kbd><img src="https://github.com/jpbruyere/vkvg/blob/master/screenshot1.png" height="260"></kbd>
+ </a>
+</p>
+
+#### Current status:
- Fill (stencil even-odd, non-zero with ear clipping).
- Stroke.
- Image loading and writing with [stb lib](https://github.com/nothings/stb)
- Test includes svg rendering with [nanoSVG](https://github.com/memononen/nanosvg)
-<p align="center">
- <a href="https://github.com/jpbruyere/vkvg/blob/master/vkvg-tiger.png">
- <kbd><img src="https://github.com/jpbruyere/vkvg/blob/master/vkvg-tiger.png" height="260"></kbd>
- </a>
- <a href="https://github.com/jpbruyere/vkvg/blob/master/screenshot1.png">
- <kbd><img src="https://github.com/jpbruyere/vkvg/blob/master/screenshot1.png" height="260"></kbd>
- </a>
-</p>
-
### Requirements:
- [CMake](https://cmake.org/): version > 12.
### Building
```bash
-git clone https://github.com/jpbruyere/vkvg.git # Download source code from github
-cd vkvg # Enter the source directory
-git submodule update --init --recursive # Dowload vkhelpers sources
-mkdir build # Create build directory
+#fetch sources from github
+git clone --recursive https://github.com/jpbruyere/vkvg.git
+cd vkvg
+# Create build directory
+mkdir build
cd build
-cmake .. # Run CMake, optionaly setup glslc path
-make # Run Make
+# Run CMake, optionaly setup glslc path
+cmake ..
+make
```
+A [detailed tutorial](doc/windows_build_tutorial.md) is available for Windows.
+
### To Do
- [x] Use Scissor where possible.
- [ ] Perf and memory checks.
- [ ] Code clean and comment.
- [ ] Documentations.
-
-
--- /dev/null
+# Build on Windows with Visual Studio IDE:
+
+(*Tested with VS 2017*)
+
+#### Build dependencies
+Make sure that [Git](https://git-scm.com/download/win) is installed on your machine by typing on the command line (cmd):
+```bash
+> git --version
+git version 2.19.1.windows.1
+```
+Install [vcpkg package manager](https://docs.microsoft.com/en-us/cpp/build/vcpkg?view=vs-2019) to build all required build dependencies:
+```bash
+git clone https://github.com/Microsoft/vcpkg.git
+cd vcpkg
+.\bootstrap-vcpkg.bat
+```
+Then install the libraries required by vkvg:
+```bash
+vcpkg install fontconfig freetype harfbuzz vulkan
+```
+Optionaly, install [GLFW] to build the samples:
+```bash
+vcpkg install glfw
+```
+#### CMake configuration
+Exit vcpkg directory and clone the vkvg repository:
+```bash
+git clone --recursive https://github.com/jpbruyere/vkvg.git
+cd vkvg
+#create a build directory
+mkdir build
+```
+To generate the solution file (.sln), use CMake IDE. Select the vkvg root folder as the source directory and the build folder we've just create in it.
+
+Configure the project and select the target build. (*for VS17 it should be something like `Visual Studio 15 2017 Win64`*).
+
+Also specify the **toolchain file** for cross-compiling provided by **vcpkg** (*C:\...\vcpkg\scripts\buildsystems\vcpkg.cmake*).
+
+On the bottom of the GUI there are some options related with the **vkvg** library. Unselect the **VKVG_LCD_FONT_FILTER** (FreeType is built without [lcd fonts](https://en.wikipedia.org/wiki/Subpixel_rendering) by default).
+
+Now generate the sln project and procede to open the project with Visual Studio.<br>
+
+#### Build vkvg
+To build the project (the **ALL BUILD** project should be the Start Up project) press **F7** or press build (top of the screen) and then press build solution. If everything goes well you finally have the .lib and .dll files to use in our projects. These files can be found in the *C:\...\vkvg\build\CMakeFiles\Debug* directory.