andymeneely / squib

A Ruby DSL for prototyping card games.
http://squib.rocks
MIT License
917 stars 67 forks source link

Unable to load variants with fonts #379

Open pie75 opened 1 year ago

pie75 commented 1 year ago

When attempting to load fonts like Arial, using variants which they includes, such as small-caps and all-small caps, pango issues a warning that it could not load the font. Also tested with Noto, which includes small-caps variants.

To Reproduce add font:'Arial small-caps' to a text Object's input, then run the deck. e.g.

require 'squib'

Squib::Deck.new() do
    background color: 'white'
    text str: 'Small Caps', font:'Arial small-caps'
    save_png
end

Expected behavior I expect squib to render the Arial font with small capitals when it is requested to.

Screenshots image

Environment