Skip to content

Latest commit

 

History

History
69 lines (44 loc) · 3.11 KB

README.md

File metadata and controls

69 lines (44 loc) · 3.11 KB

Cairo Windows Build

This repository contains project and solution files for building the Cairo graphics library and its dependencies (Pixman, FreeType, libpng, zlib) for Windows using Visual Studio.

Features

  • Builds both static and dynamic libraries
  • Supports Debug and Release configurations
  • Compatible with x86 and x64 architectures
  • Includes a fix for a memory leak related to __cairo_win32_device (issue #19)
  • Adds an additional function void pixman_reset_static_data(void); to clean up static Pixman data

Dependencies and Versions

The source code for Cairo and its dependencies is copied into the packages folder from the following repositories and tags:

Getting Started

Prerequisites

  • Visual Studio (latest recommended)

Build Instructions

  1. Clone the repository:
    git clone https://github.com/apotocki/cairo-win.git
    cd cairo-win
  2. Open the provided Visual Studio solution (.sln file).
  3. Select your desired configuration (Debug/Release) and platform (x86/x64).
  4. Build the solution.

Additional Fixes and Features

Memory Leak Fix

This build includes a fix for a memory leak related to __cairo_win32_device. More details can be found in issue #19.

pixman_reset_static_data(void)

An additional function void pixman_reset_static_data(void); has been introduced, which can be called alongside cairo_debug_reset_static_data() to clean up static Pixman data. Note that pixman_reset_static_data is not declared in a header, so users must declare it manually in their code before calling it:

extern "C" void pixman_reset_static_data(void);

Supporting My Work

If you find this project useful, consider supporting my open-source development by checking out my iOS application on the App Store:

PotoHEX
HEX File Viewer & Editor

PotoHEX allows you to inspect and edit files at the byte or character level. You can support my work by downloading the app here!

Feedback

Feedback and contributions are always welcome! Feel free to open an issue or submit a pull request.


📧 Contact: Reach out via GitHub Issues or email.

Enjoy building Cairo on Windows! 🚀