~alcinnz/CatTrap

8d989cfb5d15ff26d344ce143a92e72c5d50c694 — Adrian Cochrane 1 year, 9 months ago 6099cfd
Expose fontsize in glyphsperfont map.
1 files changed, 3 insertions(+), 2 deletions(-)

M Graphics/Layout.hs
M Graphics/Layout.hs => Graphics/Layout.hs +3 -2
@@ 323,7 323,8 @@ boxLayout parent self paginate = self8
    self8 = boxPosition (0, 0) self7

-- Useful for assembling glyph atlases.
glyphsPerFont :: LayoutItem x y z -> M.Map Pattern IS.IntSet
glyphsPerFont (LayoutSpan _ font self) = pattern font `M.singleton` IS.fromList glyphs
glyphsPerFont :: LayoutItem x y z -> M.Map (Pattern, Double) IS.IntSet
glyphsPerFont (LayoutSpan _ font self) =
    (pattern font, fontSize font) `M.singleton` IS.fromList glyphs
  where glyphs = map fromEnum $ map Hb.codepoint $ map fst $ fragmentGlyphs self
glyphsPerFont node = M.unionsWith IS.union $ map glyphsPerFont $ layoutGetChilds node