diff --git a/example/Example.hs b/example/Example.hs
--- a/example/Example.hs
+++ b/example/Example.hs
@@ -545,7 +545,7 @@
           \i ->
             do let file = FileName $
                      "nanovg/example/images/image" <> T.pack (show (i + 1)) <> ".jpg"
-               MaybeT $ createImage c file 0
+               MaybeT $ createImage c file S.empty
 
 drawCaps :: Context -> CFloat -> CFloat -> CFloat -> IO ()
 drawCaps c x y width =
diff --git a/nanovg.cabal b/nanovg.cabal
--- a/nanovg.cabal
+++ b/nanovg.cabal
@@ -1,5 +1,5 @@
 name:                nanovg
-version:             0.7.0.0
+version:             0.8.0.0
 synopsis:            Haskell bindings for nanovg
 description:         Raw bindings to the OpenGL vector graphics library NanoVG
 homepage:            https://github.com/cocreature/nanovg-hs
@@ -35,6 +35,11 @@
   default:     False
   manual:      True
 
+flag stb_truetype
+  description: Use stb_truetype. By default uses freetype.
+  default:     False
+  manual:      True
+
 library
   exposed-modules:
                    NanoVG
@@ -82,14 +87,32 @@
   c-sources:           nanovg/src/nanovg.c
                        cbits/nanovg_wrapper.c
                        cbits/nanovg_gl.c
-  cc-options:          -DNDEBUG -DFONS_USE_FREETYPE
+  if flag(stb_truetype)
+    cc-options:          -DNDEBUG
+  else
+    cc-options:          -DNDEBUG -DFONS_USE_FREETYPE
   ghc-options:         -Wall
-  if os(osx)
-    frameworks:          OpenGL
-    cc-options:          -Ddarwin_HOST_OS
+  if os(windows)
+    extra-libraries:   freeglut, glew32
+    if flag(stb_truetype)
+      pkgconfig-depends: glew
+    else
+      pkgconfig-depends: glew, freetype2
   else
-    extra-libraries:     GLU, GL, m, GLEW, X11, freetype
-    pkgconfig-depends: glew
+    if os(osx)
+      frameworks:        OpenGL
+      cc-options:        -Ddarwin_HOST_OS
+      extra-libraries:   GLEW
+      if flag(stb_truetype)
+        pkgconfig-depends: glew
+      else
+        pkgconfig-depends: glew, freetype2
+    else
+      extra-libraries:   GLU, GL, m, GLEW, X11
+      if flag(stb_truetype)
+        pkgconfig-depends: glew
+      else
+        pkgconfig-depends: glew, freetype2
   if flag(gles3)
     cpp-options:       -DGLES_3
     cc-options:        -DGLES_3
diff --git a/src/NanoVG/Internal/Image.chs b/src/NanoVG/Internal/Image.chs
--- a/src/NanoVG/Internal/Image.chs
+++ b/src/NanoVG/Internal/Image.chs
@@ -5,6 +5,8 @@
 import Foreign.Marshal.Alloc
 import Foreign.Storable
 
+import qualified Data.Set as S
+
 import NanoVG.Internal.Context
 import NanoVG.Internal.FFIHelpers
 import NanoVG.Internal.Types
@@ -24,15 +26,15 @@
 
 -- | Creates image by loading it from the disk from specified file name.
 {#fun unsafe nvgCreateImage as createImage
-        {`Context','withCString.unwrapFileName'*`FileName',`CInt'} -> `Maybe Image'safeImage#}
+        {`Context','withCString.unwrapFileName'*`FileName',bitMask`S.Set ImageFlags'} -> `Maybe Image'safeImage#}
 
 -- | Creates image by loading it from the specified chunk of memory.
 {#fun unsafe nvgCreateImageMem as createImageMem
-        {`Context',`ImageFlags',useAsCStringLen'*`ByteString'&} -> `Maybe Image'safeImage#}
+        {`Context',bitMask`S.Set ImageFlags',useAsCStringLen'*`ByteString'&} -> `Maybe Image'safeImage#}
 
 -- | Creates image from specified image data.
 {#fun unsafe nvgCreateImageRGBA as createImageRGBA
-        {`Context',`CInt',`CInt',`ImageFlags',useAsPtr*`ByteString'} -> `Maybe Image'safeImage#}
+        {`Context',`CInt',`CInt',bitMask`S.Set ImageFlags',useAsPtr*`ByteString'} -> `Maybe Image'safeImage#}
 
 -- | Updates image data specified by image handle.
 {#fun unsafe nvgUpdateImage as updateImage
