Portability | GHC |
---|---|
Stability | highly unstable |
Maintainer | Stephen Tetley <stephen.tetley@gmail.com> |
Data types representing glyph metrics loaded from font files.
- type FontName = String
- type CodePoint = Int
- data GlyphMetricsTable cu = GlyphMetricsTable {
- glyph_bounding_box :: BoundingBox cu
- glyph_default_adv_vec :: Vec2 cu
- glyph_adv_vecs :: IntMap (Vec2 cu)
- glyph_cap_height :: cu
- data GlyphMetrics = GlyphMetrics {
- get_bounding_box :: forall u. FromPtSize u => PtSize -> BoundingBox u
- get_av_lookup :: forall u. FromPtSize u => PtSize -> CodePoint -> Vec2 u
- get_cap_height :: forall u. FromPtSize u => PtSize -> u
- buildMetrics :: (cu -> PtSize) -> GlyphMetricsTable cu -> GlyphMetrics
- type BaseGlyphMetrics = Map FontName GlyphMetrics
- monospace_metrics :: GlyphMetrics
Documentation
data GlyphMetricsTable cu Source
NOTE - GlyphMetrics table is parametric on cu
-
Character unit and not on the usual u
.
GlyphMetricsTable | |
|
data GlyphMetrics Source
GlyphMetrics | |
|
buildMetrics :: (cu -> PtSize) -> GlyphMetricsTable cu -> GlyphMetricsSource
monospace_metrics :: GlyphMetricsSource
This ignores the Char code lookup and just returns the default advance vector.