Text: outline a string with a color or gradient
Fill color is still the same with 'color' (i.e. can be overridden by markup still), but now there's a stroke_width and a stroke_color option that, when stroke_width > 0, will draw an outline below the text. Since this isn't a Pango feature, we can't do markup for outlines. (Maybe make that a feature request to Pango if you want it.) Implements #51
This commit is contained in:
@@ -78,6 +78,10 @@ Squib::Deck.new(width: 825, height: 1125, cards: 3) do
|
||||
embed.svg key: ':health:', width: 28, height: 28, file: 'glass-heart.svg'
|
||||
end
|
||||
|
||||
text str: "Stroke n <span fgcolor=\"\#ff0000\">fill</span>",
|
||||
color: :green, stroke_width: 3.0, stroke_color: :blue,
|
||||
x: '1.8in', y: '3in', width: '0.85in', font: 'Sans Bold 26', markup: true
|
||||
|
||||
text str: "<b>Markup</b> is <i>quite</i> <s>'easy'</s> <span fgcolor=\"\#ff0000\">awesome</span>. Can't beat those \"smart\" 'quotes', now with 10--20% more en-dashes --- and em-dashes --- with explicit ellipses too...",
|
||||
markup: true,
|
||||
x: 50, y: 1000,
|
||||
|
||||
Reference in New Issue
Block a user