Skip to content

Commit

Permalink
MSWindows test. FreeType2 looks great
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey013 committed Mar 13, 2012
1 parent 23cfd9b commit 937336d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import Display
import MyndState
import Codec.Picture

makeFont :: IO (Maybe TextureObject)
makeFont = do
makeFont :: String -> IO (Maybe TextureObject)
makeFont filename = do
let h = 480
a = (25 / 360) * pi * 2
pen <- mallocForeignPtr
Expand All @@ -51,7 +51,7 @@ makeFont = do

faceptr <- malloc
print $ faceptr == nullPtr
face <- withCString "./res/DroidSansMono.ttf" $ \str -> do
face <- withCString filename $ \str -> do
print =<< ft_New_Face library str 0 faceptr
peek faceptr

Expand Down Expand Up @@ -120,7 +120,7 @@ main = do
initGLFW 800 600
curry reshape 800 600
--tex <- makeTexture "res/pixelTest.png"
tex <- makeFont
tex <- makeFont "res/DejaVuSansMono.ttf"
network <- compile $ do
eKeyPush <- keyboardPress
eResize <- windowResize
Expand Down

0 comments on commit 937336d

Please sign in to comment.