dwww Home | Show directory contents | Find package

context("font file metric info")


test_that("a string has positive dimensions", {
  skip_if_not_installed("fontquiver")
  file <- fontquiver::font("Bitstream Vera", "Sans", "Bold")$ttf
  value <- str_metrics(x = "Hello World", fontsize = 12, fontfile = file )
  expect_true( value["width"] > 0)
  expect_true( value["ascent"] > 0 )
  expect_false( value["descent"] < 0 )
})

Generated by dwww version 1.15 on Fri Jun 28 08:49:43 CEST 2024.