loadDemoData :: Context -> MaybeT IO DemoData
loadDemoData c = do icons <- MaybeT $ createFont c "icons" (FileName "nanovg/example/entypo.ttf")
                    normal <- MaybeT $ createFont c "sans" (FileName "nanovg/example/Roboto-Regular.ttf")
                    bold <- MaybeT $ createFont c "sans-bold" (FileName "nanovg/example/Roboto-Bold.ttf")
                    images <- loadImages
                    pure (DemoData icons normal bold images)
  where loadImages :: MaybeT IO (V.Vector Image)
        loadImages =
          V.generateM 12 $
          \i ->
            do let file = FileName $
                     "nanovg/example/images/image" <> T.pack (show (i + 1)) <> ".jpg"
               MaybeT $ createImage c file S.empty
loadDemoData :: Context -> MaybeT IO DemoData
loadDemoData c = do icons <- MaybeT $ createFont c "icons" (FileName "nanovg/example/entypo.ttf")
                    normal <- MaybeT $ createFont c "sans" (FileName "nanovg/example/Roboto-Regular.ttf")
                    bold <- MaybeT $ createFont c "sans-bold" (FileName "nanovg/example/Roboto-Bold.ttf")
                    images <- loadImages
                    pure (DemoData icons normal bold images)
  where loadImages :: MaybeT IO (V.Vector Image)
        loadImages =
          V.generateM 12 $
          \i ->
            do let file = FileName $
                     "nanovg/example/images/image" <> T.pack (show (i + 1)) <> ".jpg"
               MaybeT $ createImage c file S.empty
loadDemoData c = do icons <- MaybeT $ createFont c "icons" (FileName "nanovg/example/entypo.ttf")
                    normal <- MaybeT $ createFont c "sans" (FileName "nanovg/example/Roboto-Regular.ttf")
                    bold <- MaybeT $ createFont c "sans-bold" (FileName "nanovg/example/Roboto-Bold.ttf")
                    images <- loadImages
                    pure (DemoData icons normal bold images)
  where loadImages :: MaybeT IO (V.Vector Image)
        loadImages =
          V.generateM 12 $
          \i ->
            do let file = FileName $
                     "nanovg/example/images/image" <> T.pack (show (i + 1)) <> ".jpg"
               MaybeT $ createImage c file S.empty