M src/Typograffiti/Atlas.hs => src/Typograffiti/Atlas.hs +0 -1
@@ 235,5 235,4 @@ stringTris' :: (MonadIO m, MonadError TypograffitiError m) =>
Atlas -> [(GlyphInfo, GlyphPos)] -> m (Vector (V2 Float, V2 Float))
stringTris' atlas glyphs = do
(_, _, ret) <- stringTris atlas glyphs
- liftIO $ print ret
return $ UV.concat $ reverse ret
M src/Typograffiti/Text.hs => src/Typograffiti/Text.hs +2 -3
@@ 154,8 154,7 @@ makeDrawText lib filepath index fontsize SampleText {..} = do
liftIO $ ft_Done_Face font
drawGlyphs <- makeDrawGlyphs
- -- FIXME get drawLinesWrapper working again!
- return $ \RichText {..} ->
+ return $ drawLinesWrapper tabwidth $ \RichText {..} ->
drawGlyphs atlas $ shape font' defaultBuffer { HB.text = text } features
where
x2 = (*2)
@@ 171,7 170,7 @@ drawLinesWrapper :: (MonadIO m, MonadFail m) =>
Int -> (RichText -> m (AllocatedRendering [TextTransform])) ->
RichText -> m (AllocatedRendering [TextTransform])
drawLinesWrapper indent cb RichText {..} = do
- let features' = splitFeatures 0 features $ Txt.lines text
+ let features' = splitFeatures 0 features (Txt.lines text) ++ repeat []
let cb' (a, b) = cb $ RichText a b
renderers <- mapM cb' $ flip zip features' $ map processLine $ Txt.lines text
let drawLine ts wsz y renderer = do