Running examples in ‘image.textlinedetector-Ex.R’ failed
The error most likely occurred in:

> ### Name: image_textlines_astar
> ### Title: Text Line Segmentation based on the A* Path Planning Algorithm
> ### Aliases: image_textlines_astar
> 
> ### ** Examples
> 
> library(opencv)
> library(magick)
Linking to ImageMagick 6.9.12.3
Enabled features: cairo, fontconfig, freetype, heic, lcms, pango, raw, rsvg, webp
Disabled features: fftw, ghostscript, x11
> library(image.textlinedetector)
> path   <- system.file(package = "image.textlinedetector", "extdata", "example.png")
> img    <- image_read(path)
> img    <- image_resize(img, "x1000")
> areas  <- image_textlines_astar(img, morph = TRUE, step = 2, mfactor = 5, trace = TRUE)
- Detecting lines location.. ==> 10 areas found.
- A* path planning algorithm..
	line #1 - from [108, 0] to [108, 1276]
	line #2 - from [203, 0] to [203, 1276]
	line #3 - from [294, 0] to [294, 1276]
	line #4 - from [387, 0] to [387, 1276]
	line #5 - from [479, 0] to [479, 1276]
	line #6 - from [572, 0] to [572, 1276]
	line #7 - from [665, 0] to [665, 1276]
	line #8 - from [758, 0] to [758, 1276]
	line #9 - from [851, 0] to [851, 1276]
> areas  <- lines(areas, img)
> areas$n
[1] 9
> areas$overview
<pointer: 0x15373a520>
attr(,"class")
[1] "opencv-image"
> areas$lines
  x_from x_to y_from y_to
1    108  108      0 1276
2    203  203      0 1276
3    294  294      0 1276
4    387  387      0 1276
5    479  479      0 1276
6    572  572      0 1276
7    665  665      0 1276
8    758  758      0 1276
9    851  851      0 1276
> areas$textlines[[2]]
<pointer: 0x15361eac0>
attr(,"class")
[1] "opencv-image"
> areas$textlines[[4]]
<pointer: 0x15366ae90>
attr(,"class")
[1] "opencv-image"
> combined <- lapply(areas$textlines, FUN=function(x) image_read(ocv_bitmap(x)))
> combined <- do.call(c, combined)
> combined
   format width height colorspace matte filesize density
1     PNG  1277    111       sRGB FALSE        0   72x72
2     PNG  1277    104       sRGB FALSE        0   72x72
3     PNG  1277    104       sRGB FALSE        0   72x72
4     PNG  1277    102       sRGB FALSE        0   72x72
5     PNG  1277     97       sRGB FALSE        0   72x72
6     PNG  1277    100       sRGB FALSE        0   72x72
7     PNG  1277    102       sRGB FALSE        0   72x72
8     PNG  1277    106       sRGB FALSE        0   72x72
9     PNG  1277     94       sRGB FALSE        0   72x72
10    PNG  1277    151       sRGB FALSE        0   72x72
> image_append(combined, stack = TRUE)
  format width height colorspace matte filesize density
1    PNG  1277   1071       sRGB FALSE        0   72x72
> 
> plt <- image_draw(img)
Fontconfig error: Cannot load default config file
Error in graphics::mtext(sprintf("help(\"%s\")", nameEx()), side = 4,  : 
  R: UnableToReadFont `helvetica' @ error/annotate.c/RenderFreetype/1396