| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Codec.Ktx2.Font
Contents
Synopsis
- pattern KTX_KEY_atlas :: Text
- pattern KTX_KEY_kbts :: Text
- pattern KTX_KEY_kbts_version :: Text
- kbtsVersion :: Text
- bundleFont :: FilePath -> FilePath -> FilePath -> FilePath -> IO ()
- capScalePlanes :: Float -> Compact -> Compact
- pushBundleFont :: Context -> Bundle -> IO Int
- data Bundle = Bundle {}
- loadBundleFile :: FilePath -> IO Bundle
- loadBundleBytes :: ByteString -> IO Bundle
- loadBundle :: ReadChunk a => Context a -> IO Bundle
- freeBundle :: Bundle -> IO ()
- data StackContext a = StackContext {}
- createStackContext :: Foldable t => t Bundle -> IO (StackContext ())
- mapWithBundle :: Foldable t => t (Bundle, a -> b) -> StackContext a -> StackContext b
- destroyStackContext :: StackContext a -> IO ()
- lookupBundled :: Font -> StackContext a -> Maybe a
- lookupAtlas :: Font -> StackContext a -> Maybe Compact
- mapBundled :: (a -> b) -> StackContext a -> StackContext b
Documentation
pattern KTX_KEY_atlas :: Text Source #
pattern KTX_KEY_kbts :: Text Source #
pattern KTX_KEY_kbts_version :: Text Source #
kbtsVersion :: Text Source #
pushBundleFont :: Context -> Bundle -> IO Int Source #
Put already-loaded font to context.
The context will NOT keep a fontData reference.
Constructors
| Bundle | |
loadBundleBytes :: ByteString -> IO Bundle Source #
freeBundle :: Bundle -> IO () Source #
Shaping contexts
data StackContext a Source #
Constructors
| StackContext | |
Instances
createStackContext :: Foldable t => t Bundle -> IO (StackContext ()) Source #
Create shaping context and push fonts from all the bundles.
mapWithBundle :: Foldable t => t (Bundle, a -> b) -> StackContext a -> StackContext b Source #
Update font annotations with the bundle collection annotated with update functions.
This may be used to attach more information, e.g. after all fonts were assigned texture slots.
The update collection should be a superset of what was initially bundled. Otherwise you may see missing things downstream.
destroyStackContext :: StackContext a -> IO () Source #
Destroy shaping context.
NB: Does NOT free the fonts as they may be shared with other stacks. Use freeBundle for that.
lookupBundled :: Font -> StackContext a -> Maybe a Source #
lookupAtlas :: Font -> StackContext a -> Maybe Compact Source #
mapBundled :: (a -> b) -> StackContext a -> StackContext b Source #