diff --git a/CHANGES.md b/CHANGES.md
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,3 +1,11 @@
+1.8.2 (15 Aug 2026)
+-------------------
+
+- Fix some warnings
+- Allow `containers-0.8` and `diagrams-lib-1.6`
+- Test on GHC 9.14
+- Remove unnecessary dependencies: `diagrams-core`, `directory`, `parsec`
+
 1.8.1 (15 Feb 2025)
 -------------------
 
diff --git a/SVGFonts.cabal b/SVGFonts.cabal
--- a/SVGFonts.cabal
+++ b/SVGFonts.cabal
@@ -1,5 +1,5 @@
 Name:             SVGFonts
-Version:          1.8.1
+Version:          1.8.2
 Synopsis:         Fonts from the SVG-Font format
 Description:      Native font support for the diagrams framework (<https://diagrams.github.io/>). Note that this package can be used with any diagrams backend, not just the SVG backend.  The SVG-font format is easy to parse
                   and was therefore chosen for a font library completely written in Haskell.
@@ -34,7 +34,7 @@
 data-files:       fonts/*.svg
 extra-source-files: CHANGES.md, README.md, diagrams/*.svg
 extra-doc-files:    diagrams/*.svg
-Tested-with:      GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2 || ==9.10.1 || ==9.12.1
+Tested-with:      GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.7 || ==9.8.4 || ==9.10.3 || ==9.12.2 || ==9.14.1
 source-repository head
   type: git
   location: https://github.com/diagrams/SVGFonts.git
@@ -49,14 +49,11 @@
         bytestring >= 0.10 && < 1.0,
         cereal,
         cereal-vector,
-        containers >= 0.4 && < 0.8,
+        containers >= 0.4 && < 0.9,
         data-default-class >= 0.2 && < 0.3,
-        diagrams-core >= 1.3 && < 1.6,
-        diagrams-lib >= 1.3 && < 1.6,
-        directory >= 1.1,
+        diagrams-lib >= 1.3 && < 1.7,
         blaze-svg >= 0.3.3,
         blaze-markup >= 0.5,
-        parsec,
         split,
         text,
         vector,
diff --git a/src/Graphics/SVGFonts/ReadFont.hs b/src/Graphics/SVGFonts/ReadFont.hs
--- a/src/Graphics/SVGFonts/ReadFont.hs
+++ b/src/Graphics/SVGFonts/ReadFont.hs
@@ -93,9 +93,10 @@
 parseFont basename contents = readFontData fontElement basename
   where
     xml = onlyElems $ parseXML $ contents
-    fontElement | null fontElements = error ("no <font>-tag found in SVG file using SVGFonts library." ++
+    fontElement = case catMaybes fontElements of
+      [] -> error ("no <font>-tag found in SVG file using SVGFonts library." ++
                                              "Most likely wrong namespace in <svg>-tag. Please delete xmlns=...")
-                | otherwise = head $ catMaybes $ fontElements
+      (f:_) -> f
 
     fontElements = map (findElement (qTag "font")) xml ++ -- sometimes there is a namespace given with <svg xmlns=...
                    map (findElement (unqual "font")) xml -- sometimes not: <svg>
@@ -271,12 +272,14 @@
 
 -- | Change the horizontal advance of two consective chars (kerning)
 kernAdvance :: RealFloat n => String -> String -> Kern n -> Bool -> n
-kernAdvance ch0 ch1 kern u |     u && not (null s0) = (kernK kern) V.! (head s0)
-                           | not u && not (null s1) = (kernK kern) V.! (head s1)
-                           | otherwise = 0
-  where s0 = intersect (s kernU1S ch0) (s kernU2S ch1)
-        s1 = intersect (s kernG1S ch0) (s kernG2S ch1)
-        s sel ch = concat (maybeToList (Map.lookup ch (sel kern)))
+kernAdvance ch0 ch1 kern u
+  | u, (s0h : _) <- s0 = kernK kern V.! s0h
+  | not u, (s1h : _) <- s1 = kernK kern V.! s1h
+  | otherwise = 0
+ where
+  s0 = intersect (s kernU1S ch0) (s kernU2S ch1)
+  s1 = intersect (s kernG1S ch0) (s kernG2S ch1)
+  s sel ch = concat (maybeToList (Map.lookup ch (sel kern)))
 
 -- > import Graphics.SVGFonts.ReadFont
 -- > linL <- loadDataFont "fonts/LinLibertine.svg"
