Commit Graph

137 Commits (0154b13e686559d5e623bffe1d22b6b038b8f98a)

Author SHA1 Message Date
Andy Meneely a86974d5b8 Regression and sanity testing 2015-05-19 15:02:54 -04:00
Andy Meneely dab544a53b Add ellipse method
Also experimenting with using stroke_preserve, which in turn may make the other methods less repetitive.

Closes #66
2015-04-30 11:48:21 -04:00
Andy Meneely ac7769237c Fix the csv_import.rb sample to function properly 2015-04-30 10:05:34 -04:00
Andy Meneely 71defb9e33 Fix color handling with text outline stroking
Needed to set squibcolor prior to translating the coordinate system so that gradients are relative to the card (as is documented). This also means stroking is done AFTER drawing the text, which looks better anyway.
2015-04-30 09:54:41 -04:00
Andy Meneely 2e84cf4e6a Update load_images expected png for sanity testing 2015-04-30 09:37:57 -04:00
Andy Meneely e974880e03 Add 'data' field to svg method for loading XML directly
Implements #65
2015-04-29 16:49:38 -04:00
Andy Meneely b03dbb54da Fix unit test breakage 2015-04-28 22:31:15 -04:00
Andy Meneely 7c69cad506 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
2015-04-28 22:27:26 -04:00
Andy Meneely 1dc89ae76a Port global text hints to the new conf 2015-04-28 21:01:49 -04:00
Andy Meneely 923f346575 Redesigning how config files are read, stored, and delegated
With the new design, we take the load off of deck.rb and simply delegate methods over to the new conf.rb. This means that things like `antialias` is now available as a method to the normal Squib scripts for easy checking (without being mutable). Squib::Conf also handles parsing and defaults, and any potential input validation we need to do in the future.

Typographer is also set up now as a deck-wide configuration. This may change in the future if we want typography customization per-command, although that seems like a strange use case.

Lots of tests for this one, and lots of cross-cutting concerns in this commit.

This commit also includes some tweaks to rspec tests, including tagging of slow tests for a `rake spec_fastonly`

Conflicts:
	spec/samples/samples_regression_spec.rb
	spec/spec_helper.rb
	squib.sublime-project
2015-04-28 20:31:53 -04:00
Andy Meneely 74865cb10f Sanity test: pixel-by-pixel comparison 2015-04-28 16:07:40 -04:00
Andy Meneely 5ea9ce619f Basic visual sanity test for better regression testing 2015-04-27 11:15:31 -04:00
Andy Meneely bed94e47ba Changing rspec sample regressions to one-at-a-time 2015-04-27 09:58:25 -04:00
Andy Meneely 0aa5c500c0 Fix broken test 2015-04-27 09:26:46 -04:00
Andy Meneely 25773a8ee5 Better regression tests for roo 2015-04-27 08:50:03 -04:00
Andy Meneely 035cd6259e Fix global hinting logic
Fixes #63
2015-04-16 21:24:21 -04:00
Andy Meneely 4a0c5e78b6 Fix PDF scaling issue
Properly compute the size of the PDF based on DPI and PDF-specific resolution (i.e. 72dpi).

Closes #62
2015-04-13 22:59:34 -04:00
Andy Meneely 0185f2dfcf Fixing up regression tests for release 2015-04-13 21:33:55 -04:00
Andy Meneely 0616512bd6 Set font antialiasing from global antialiasing
This is a workaround until we get a proper solution in #59
2015-04-13 21:26:41 -04:00
Andy Meneely 063d5156d6 Allow configuration of typographical replacements, e.g. smart quotes
If you're living in a non-UTF-8 character set, then you can configure what quotes are smartly changed.
If my regexes are messing things up, you can also turn this off with smart_quotes: false
Also updated docs.

This closes #50
2015-04-07 21:21:00 -04:00
Andy Meneely beb46a9e1c Place embedded icons based on byte offset
Fixes #57
2015-04-07 19:43:16 -04:00
Andy Meneely 211e7c13b3 Fix typography replacements with embeds
Enable embedded icons tests again
2015-04-07 12:20:40 -04:00
Andy Meneely a5d1cb60f2 Complete overhaul of smart quotes to "typographer"
See README for details

Contributes to #50
2015-04-07 00:16:06 -04:00
Andy Meneely 674397c005 Smart quotes!
Closes #50
2015-04-04 16:02:20 -04:00
Andy Meneely 19cad2cdb8 Using a platform-specific fix for zero-width letters on embedding icons
Contributes to #30 and our zero-width letter woes.
2015-04-04 09:15:21 -04:00
Andy Meneely 91ba48f80b Explicitly saving and restoring the matrix 2015-04-02 10:14:08 -04:00
Andy Meneely c9f9235be7 Attempting travis fix by saving and restoring the matrix 2015-04-02 10:00:26 -04:00
Andy Meneely 784a0dcb90 Updating the regression test 2015-03-31 21:24:28 -04:00
Andy Meneely 574b76873e Updating regression tests, renamed bezier curve params 2015-03-26 19:50:12 -04:00
Andy Meneely 2cc9cc8e93 Initial implementation of curves
Contributes to #37
2015-03-19 18:15:24 -04:00
Andy Meneely cb33e8a40e Updating unit tests 2015-03-19 00:24:52 -04:00
Andy Meneely 3a57380959 Updated and corrected regression tests 2015-03-19 00:24:51 -04:00
Andy Meneely 2caacaeece Fixing compatibility with linux os
Thank you, Travis! Turns out the cairo gem isn't perfectly the same in Linux...
2015-02-28 21:39:26 -05:00
Andy Meneely 499050c4ee Requiring squib in more places on specs
Trying to fix unit tests on travis
2015-02-28 21:09:56 -05:00
Andy Meneely f49bff2388 Add antialias config option
Closes #41
2015-02-28 19:34:46 -05:00
Andy Meneely 612c042d52 SVG backend: PDF implemented, tests passing
Wrapping up the svg backend work

Still some bugs to stamp out, but this is getting close to release ready.
2015-02-24 22:33:32 -05:00
Andy Meneely 8876b27473 Merging in svg back end work. All but save_doc is done. 2015-02-20 22:56:07 -05:00
Andy Meneely d030bdd7f9 Adding specs for formatify 2015-02-13 13:45:14 -05:00
Andy Meneely a9d6ffda75 Refactoring specs, now with less leakage! 2015-02-13 13:35:38 -05:00
Andy Meneely 578c3cb6a0 Upgrading rspec, fixing mock objects bug 2015-02-13 13:26:22 -05:00
Andy Meneely d2543473c7 Fix a leftover x,y stroke on circles
Fixes #35
2015-02-13 12:54:19 -05:00
Andy Meneely 086fd5fad9 Unit conversion on save_pdf, and arbitrary paper sizes
Closes #21 and #20
2015-02-02 00:20:25 -05:00
Andy Meneely d848178bfe Unit conversion on Squib::Deck.new
Contributes to #21
2015-02-01 23:55:01 -05:00
Andy Meneely 1896689614 Refactoring out the unit conversion to its own place 2015-02-01 23:48:09 -05:00
Andy Meneely 4ecbaa4e31 Implementing format strings for filename counts on multisaves 2015-02-01 23:25:57 -05:00
Andy Meneely 7a53f68393 Implementing mask feature for images
Fixes #32.
2015-02-01 23:04:39 -05:00
Andy Meneely b0b69186e7 Don't need these regression logs 2015-01-28 15:07:57 -05:00
Andy Meneely 22866777bd Regression logs for new hex scrub 2015-01-28 10:14:14 -05:00
Andy Meneely 181fe9942a Scrubbing hex for regression testing 2015-01-26 22:54:48 -05:00
Andy Meneely bfbf7a7eba Added support for linear and radial gradients
Closes #29
2015-01-26 22:22:09 -05:00