From c8cf037564df322eaae3c856c50b216cbde962a9 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Wed, 25 Jan 2023 11:55:32 +1300 Subject: [PATCH] Fix rangechecks around fontfeatures. --- src/Typograffiti/Text.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Typograffiti/Text.hs b/src/Typograffiti/Text.hs index 60ff018..55a83c3 100644 --- a/src/Typograffiti/Text.hs +++ b/src/Typograffiti/Text.hs @@ -119,7 +119,7 @@ drawLinesWrapper indent cb string features = do HB.featEnd = min (toEnum n) (end - offset) } | feat@HB.Feature {HB.featStart = start, HB.featEnd = end} <- features', - fromEnum end <= n && end >= offset] : + fromEnum end <= n + fromEnum offset && end >= offset] : splitFeatures (offset + toEnum n) features' lines' processLine "" = " " -- enforce nonempty -- 2.30.2