Complete overhaul of smart quotes to "typographer"
See README for details Contributes to #50
This commit is contained in:
@@ -12,13 +12,17 @@ cairo: rounded_rectangle([0, 0, 825, 1125, 0, 0])
|
||||
cairo: set_source_color(["#0000"])
|
||||
cairo: fill([])
|
||||
cairo: restore([])
|
||||
cairo: antialias=(["subpixel"])
|
||||
cairo: antialias=(["subpixel"])
|
||||
cairo: antialias=(["subpixel"])
|
||||
cairo: save([])
|
||||
cairo: set_source_color([:black])
|
||||
cairo: translate([200, 0])
|
||||
cairo: translate([0, 0])
|
||||
cairo: rotate([0])
|
||||
cairo: move_to([0, 0])
|
||||
pango font: size=([18432])
|
||||
pango: font_description=([MockDouble])
|
||||
pango: text=(["Middle align: Take 1 :tool: and gain 2 :health:. Take 2 :tool: and gain 3 :purse:"])
|
||||
pango: text=(["Take 1 :tool: and gain 2 :health:."])
|
||||
pango: width=([184320])
|
||||
pango: height=([307200])
|
||||
pango: wrap=([#<Pango::Layout::WrapMode word-char>])
|
||||
@@ -27,7 +31,7 @@ pango: alignment=([#<Pango::Layout::Alignment left>])
|
||||
pango: justify=([false])
|
||||
pango: spacing=([0])
|
||||
cairo: update_pango_layout([MockDouble])
|
||||
pango: markup=(["Middle align: Take 1 :tool: and gain 2 :health:. Take 2 :tool: and gain 3 :purse:"])
|
||||
pango: markup=(["Take 1 :tool: and gain 2 :health:."])
|
||||
cairo: move_to([0, 0.0])
|
||||
cairo: update_pango_layout([MockDouble])
|
||||
cairo: show_pango_layout([MockDouble])
|
||||
@@ -36,4 +40,56 @@ cairo: set_source_color([:cyan])
|
||||
cairo: set_line_width([2.0])
|
||||
cairo: stroke([])
|
||||
cairo: restore([])
|
||||
surface: write_to_png(["_output/embed_00.png"])
|
||||
cairo: save([])
|
||||
cairo: set_source_color([:black])
|
||||
cairo: translate([0, 0])
|
||||
cairo: rotate([0])
|
||||
cairo: move_to([0, 0])
|
||||
pango font: size=([32768])
|
||||
pango: font_description=([MockDouble])
|
||||
pango: text=(["Take 1 :tool: and gain 2 :health:."])
|
||||
pango: width=([184320])
|
||||
pango: height=([307200])
|
||||
pango: wrap=([#<Pango::Layout::WrapMode word-char>])
|
||||
pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
|
||||
pango: alignment=([#<Pango::Layout::Alignment left>])
|
||||
pango: justify=([false])
|
||||
pango: spacing=([0])
|
||||
cairo: update_pango_layout([MockDouble])
|
||||
pango: markup=(["Take 1 :tool: and gain 2 :health:."])
|
||||
cairo: move_to([0, 0.0])
|
||||
cairo: update_pango_layout([MockDouble])
|
||||
cairo: show_pango_layout([MockDouble])
|
||||
cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
|
||||
cairo: set_source_color([:cyan])
|
||||
cairo: set_line_width([2.0])
|
||||
cairo: stroke([])
|
||||
cairo: restore([])
|
||||
cairo: save([])
|
||||
cairo: set_source_color([:black])
|
||||
cairo: translate([0, 0])
|
||||
cairo: rotate([0])
|
||||
cairo: move_to([0, 0])
|
||||
pango font: size=([46080])
|
||||
pango: font_description=([MockDouble])
|
||||
pango: text=(["Take 1 :tool: and gain 2 :health:."])
|
||||
pango: width=([184320])
|
||||
pango: height=([307200])
|
||||
pango: wrap=([#<Pango::Layout::WrapMode word-char>])
|
||||
pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
|
||||
pango: alignment=([#<Pango::Layout::Alignment left>])
|
||||
pango: justify=([false])
|
||||
pango: spacing=([0])
|
||||
cairo: update_pango_layout([MockDouble])
|
||||
pango: markup=(["Take 1 :tool: and gain 2 :health:."])
|
||||
cairo: move_to([0, 0.0])
|
||||
cairo: update_pango_layout([MockDouble])
|
||||
cairo: show_pango_layout([MockDouble])
|
||||
cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
|
||||
cairo: set_source_color([:cyan])
|
||||
cairo: set_line_width([2.0])
|
||||
cairo: stroke([])
|
||||
cairo: restore([])
|
||||
surface: write_to_png(["_output/embed_multi_00.png"])
|
||||
surface: write_to_png(["_output/embed_multi_01.png"])
|
||||
surface: write_to_png(["_output/embed_multi_02.png"])
|
||||
|
||||
@@ -331,7 +331,7 @@ cairo: translate([65, 400])
|
||||
cairo: rotate([0])
|
||||
cairo: move_to([0, 0])
|
||||
pango: font_description=([MockDouble])
|
||||
pango: text=(["This text has fixed width, fixed height, center-aligned, middle-valigned, has a red hint, and \u201Csmart quotes\u201D"])
|
||||
pango: text=(["This text has fixed width, fixed height, center-aligned, middle-valigned, has a red hint, and \"smart quotes\""])
|
||||
pango: width=([307200])
|
||||
pango: height=([128000])
|
||||
pango: wrap=([#<Pango::Layout::WrapMode word-char>])
|
||||
@@ -354,7 +354,7 @@ cairo: translate([65, 400])
|
||||
cairo: rotate([0])
|
||||
cairo: move_to([0, 0])
|
||||
pango: font_description=([MockDouble])
|
||||
pango: text=(["This text has fixed width, fixed height, center-aligned, middle-valigned, has a red hint, and \u201Csmart quotes\u201D"])
|
||||
pango: text=(["This text has fixed width, fixed height, center-aligned, middle-valigned, has a red hint, and \"smart quotes\""])
|
||||
pango: width=([307200])
|
||||
pango: height=([128000])
|
||||
pango: wrap=([#<Pango::Layout::WrapMode word-char>])
|
||||
@@ -829,8 +829,8 @@ cairo: translate([50, 1000])
|
||||
cairo: rotate([0])
|
||||
cairo: move_to([0, 0])
|
||||
pango: font_description=([MockDouble])
|
||||
pango: text=(["<b>Markup</b> is also <i>quite</i> <s>easy</s> awesome"])
|
||||
pango: markup=(["<b>Markup</b> is also <i>quite</i> <s>easy</s> awesome"])
|
||||
pango: text=(["<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..."])
|
||||
pango: markup=(["foo"])
|
||||
pango: width=([768000])
|
||||
pango: height=([102400])
|
||||
pango: wrap=([#<Pango::Layout::WrapMode word-char>])
|
||||
@@ -853,8 +853,8 @@ cairo: translate([50, 1000])
|
||||
cairo: rotate([0])
|
||||
cairo: move_to([0, 0])
|
||||
pango: font_description=([MockDouble])
|
||||
pango: text=(["<b>Markup</b> is also <i>quite</i> <s>easy</s> awesome"])
|
||||
pango: markup=(["<b>Markup</b> is also <i>quite</i> <s>easy</s> awesome"])
|
||||
pango: text=(["<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..."])
|
||||
pango: markup=(["foo"])
|
||||
pango: width=([768000])
|
||||
pango: height=([102400])
|
||||
pango: wrap=([#<Pango::Layout::WrapMode word-char>])
|
||||
@@ -877,8 +877,8 @@ cairo: translate([50, 1000])
|
||||
cairo: rotate([0])
|
||||
cairo: move_to([0, 0])
|
||||
pango: font_description=([MockDouble])
|
||||
pango: text=(["<b>Markup</b> is also <i>quite</i> <s>easy</s> awesome"])
|
||||
pango: markup=(["<b>Markup</b> is also <i>quite</i> <s>easy</s> awesome"])
|
||||
pango: text=(["<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..."])
|
||||
pango: markup=(["foo"])
|
||||
pango: width=([768000])
|
||||
pango: height=([102400])
|
||||
pango: wrap=([#<Pango::Layout::WrapMode word-char>])
|
||||
|
||||
Reference in New Issue
Block a user