Commit Graph

229 Commits (aada86a0709ddd3374871ba378e5c2cfb2566b95)

Author SHA1 Message Date
Andy Meneely fd01e8c4b3 samples: remove boring sample 2016-04-11 20:51:56 -04:00
Andy Meneely 40ac4651f1 samples: documenting a hack related to #136 2016-04-11 20:51:11 -04:00
Andy Meneely 43d44aa944 samples: gists --> backend 2016-04-11 20:42:48 -04:00
Andy Meneely 9418aee3de samples: start all-sample gist 2016-04-11 20:26:56 -04:00
Andy Meneely e55c450d16 build_groups: rename to build instead of group 2016-03-20 22:52:04 -04:00
Andy Meneely dad2ab5ba9 👮 newline at end of file 2016-03-17 23:51:37 -04:00
Andy Meneely 0cbcc0c683 👮 string literals should be single-quoted 2016-03-17 23:49:04 -04:00
Andy Meneely 65a0fdfd47 👮 leading space in comments 2016-03-17 23:47:32 -04:00
Andy Meneely 310030eee4 👮 spaces around operators 2016-03-17 23:40:41 -04:00
Andy Meneely 5e09e0f1e1 👮 fix spacing inside hashes 2016-03-17 23:38:48 -04:00
Andy Meneely 137e3f91cd 👮 fix extra spaces 2016-03-17 23:27:07 -04:00
Andy Meneely 8a9552126c 👮 fix space after comma 2016-03-17 23:22:16 -04:00
Andy Meneely 955d64a01f feature: add use_layout method to load layouts at runtime
Closes #141
2016-03-16 17:05:07 -04:00
Andy Meneely a90755096a samples: update expected image 2016-03-15 23:24:50 -04:00
Andy Meneely ebc8851ae8 samples: demonstrate font strings better
Fixes #138
2016-03-15 23:21:54 -04:00
Andy Meneely 864226dff3 samples: fix ignore on built files 2016-03-15 23:09:38 -04:00
Andy Meneely 9cdd3c4d2f text: fix valign when we only have an embed key
Fixes #134
2016-03-15 23:07:23 -04:00
Andy Meneely 9eb348236d samples: ignore pre-built files 2016-03-15 18:26:24 -04:00
Andy Meneely f408b7a88f csv: data option
Close #137
2016-03-15 17:45:39 -04:00
Andy Meneely 80cd0b924f samples: silence the build_group sample 2016-03-15 17:40:08 -04:00
Andy Meneely 61a3d3446b feature: build groups
See docs and changelog for more details on how these work.
2016-03-13 00:38:13 -05:00
Andy Meneely aae1c0a4c6 samples/text: Rebuild on home machine 2016-01-10 20:31:13 -05:00
Andy Meneely cf736db067 Maintain coordinate system when using gradients
Sample: document this better
spec: test this and update past tests

Fixes #127
2016-01-10 20:30:30 -05:00
Andy Meneely 4c0325aba1 samples/text: update output 2015-12-21 10:56:05 -05:00
Andy Meneely b560643332 Add submodule gist: _autoscale_font.rb 2015-12-13 21:11:22 -05:00
Andy Meneely 8b0067546f save_png: add trim and trim_radius options
Close #122.
2015-12-11 23:09:04 -05:00
Andy Meneely b05e1243f1 samples: use the latest _text.rb sample 2015-12-11 21:22:32 -05:00
Andy Meneely 960ba03137 Samples: add submodule samples/text 2015-11-30 08:50:44 -05:00
Andy Meneely dc85439350 Samples: new gist for text 2015-11-30 08:50:44 -05:00
Andy Meneely 52f3def03b Samples: _images output 2015-11-24 00:37:44 -05:00
Andy Meneely 645c9ff061 Samples: new images gist 2015-11-23 23:39:35 -05:00
Andy Meneely 7759eed6f3 Fix expected images after rebuild 2015-11-23 22:55:04 -05:00
Andy Meneely 16015a61a7 Rename sample/intro files to be more gist-friendly 2015-11-23 22:52:06 -05:00
Andy Meneely f33a74cada Samples: intro gist
Also make the sample regression spec more subdirectory friendly
2015-11-23 22:44:44 -05:00
Andy Meneely 710d28f5a8 Add warning to suppress png scaling warning
Close #120
2015-11-02 21:07:14 -05:00
Andy Meneely b00cc99dd0 Added a grid shape
Close #68
2015-10-26 23:59:51 -04:00
Andy Meneely d99e840ffd PNG/SVG: flipping is now supported.
Fixes #11
2015-10-26 23:31:16 -04:00
Andy Meneely 169f9e4ac4 SVGs: now with more cropping power!
Contributes to #11
2015-10-26 22:47:42 -04:00
Andy Meneely 541c8d49ca Crop PNGs, now with more rounded corners!
Contributes to #11
2015-10-26 22:35:56 -04:00
Andy Meneely 08381b86f0 Add quantity explosion to xlsx and csv
Closes #78
2015-10-20 18:23:25 -04:00
Andy Meneely c8e6f9803c xlsx,csv: trim whitespace, yield to optional block
Closes #108 and #79
2015-10-13 10:37:49 -04:00
Andy Meneely 40ac6d2b6b Expanding the Working With Text section
[skip ci]
2015-07-29 12:20:35 -04:00
Andy Meneely 19767c54c4 Implement stroke_strategy option for all drawing operations
Fixes #102
2015-07-27 22:55:49 -04:00
Andy Meneely e03a97ce7e Add :scale shortcut to width/height of png and svg
Allows scaling while keeping the aspect ratio

Closes #91
2015-07-27 13:25:12 -04:00
Andy Meneely 8f977f5956 Update text_options.rb sample, and expected output 2015-07-26 23:25:43 -04:00
Andy Meneely 9d475995e8 Pango scaling of "spacing" in text is done once
Spacing also defaults to nil, not zero, as before

Fixes #98
2015-07-26 22:26:42 -04:00
Andy Meneely d899795f2b Remove debug line 2015-07-26 21:50:54 -04:00
Andy Meneely 003a26ae68 Two new built-in layouts: fantasy.yml and economy.yml
Contributes to #97
2015-07-26 00:59:12 -04:00
Andy Meneely 92d866548c Cleanup of img_dir and testing of input_file.rb 2015-07-21 21:04:23 -04:00
Andy Meneely e20c644a9a Implemented new args design for svg and png
As part of that implementation, text_embed now supports singleton expansion. Closes #54
2015-07-21 20:27:15 -04:00
Andy Meneely ff3d057d49 Add a force_id: true example to load_images 2015-07-21 20:17:08 -04:00
Andy Meneely 2dd3fc3365 Documented a range idiom
In reaction to #90

[skip ci]
2015-07-03 16:01:44 -04:00
Andy Meneely 79814a43ea Start migrating text over to new args system
Almost there. It's working fine with the sample, but next it's time to write validators to get all this arg logic out of text.rb and make it just about drawing text.

Yes, unit tests aren't updated yet.
[skip ci]
2015-07-03 02:11:32 -04:00
Andy Meneely 78ee185fde Update sample to use cleaner syntax 2015-06-11 17:19:32 -04:00
Andy Meneely 8a7841d64f Add dash option to drawing operations
Currently only impacts rect, but it will impact others with the new design shortly
2015-06-08 15:26:33 -04:00
Andy Meneely 12c5cd675b Added line cap and join settings for rect and curve
More forthcoming - these are proof-of-concept
2015-06-08 14:17:46 -04:00
Andy Meneely 6c60f21bb0 Refactored drawing to get fill_n_stroke
Contributes to #75
2015-06-04 16:40:55 -04:00
Andy Meneely 3bbc787025 Add polygon method to dsl
Testing and documentation too.

Closes #67
2015-05-22 06:12:48 -04:00
Andy Meneely 4b63716dfc Star feature works, testing is still pending 2015-05-21 09:29:01 -04:00
Andy Meneely 14e04a89c7 Started the star feature
Contributes to #72

[skip ci]
2015-05-21 09:29:00 -04:00
Andy Meneely a86974d5b8 Regression and sanity testing 2015-05-19 15:02:54 -04:00
Andy Meneely 31b583d134 Implementation of hand 2015-05-19 14:40:21 -04:00
Andy Meneely 824e26d2c2 Hacked together a basic example to work from 2015-05-13 09:42:14 -04:00
Andy Meneely f0f9b7680d Starting a basic hand command 2015-05-11 23:30:30 -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 e974880e03 Add 'data' field to svg method for loading XML directly
Implements #65
2015-04-29 16:49:38 -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 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 838b1fd085 Removing scratch code 2015-04-13 23:19:59 -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 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 2d9ba40486 Making this work for now
Related to #56
2015-04-13 21:13:26 -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 874bdba8bc Fix a string replacement issue.
Contributes to #30
2015-04-04 09:33:04 -04:00
Andy Meneely c9f9235be7 Attempting travis fix by saving and restoring the matrix 2015-04-02 10:00:26 -04:00
Andy Meneely 03e41c7e81 Adding regression tests for various cases to test PR #53
Close #53.
2015-03-31 17:05:03 -04:00
Andy Meneely 574b76873e Updating regression tests, renamed bezier curve params 2015-03-26 19:50:12 -04:00
Andy Meneely 42ae2144e0 Fix index location issue, working on vertical placement
Contributes to #30

Also added little adjusters for the icons in case your icon is a little off.
[skip ci]
2015-03-24 14:59:21 -04:00
Andy Meneely 2cc9cc8e93 Initial implementation of curves
Contributes to #37
2015-03-19 18:15:24 -04:00
Andy Meneely ac2b46921d Add support for embedding pngs
Refactored into passing a Proc. I love those things.
2015-03-19 17:00:27 -04:00
Andy Meneely d386ae0426 Finish my thought 2015-03-19 00:24:51 -04:00
Andy Meneely 50ddf0f576 Making the demo be left-aligned for now 2015-03-19 00:24:50 -04:00
Andy Meneely 77e5fcce06 Cleaning up
Although it appears we still have issues with text_options being different on different cards. Very strange.
2015-03-19 00:24:49 -04:00
Andy Meneely c6cb0ca288 Saving a wonky bug example for posterity 2015-03-19 00:24:48 -04:00
Andy Meneely 666dae393d Base functionality of icon embedding working
Contributes to #30
2015-03-19 00:24:47 -04:00
Andy Meneely 82c141fbf4 Better docs on gradient coordinate behaviors 2015-02-28 20:53:59 -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 05b943f914 Deleting hacky testbed 2015-02-24 21:16:46 -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 086fd5fad9 Unit conversion on save_pdf, and arbitrary paper sizes
Closes #21 and #20
2015-02-02 00:20:25 -05:00
Andy Meneely 7a53f68393 Implementing mask feature for images
Fixes #32.
2015-02-01 23:04:39 -05:00
Andy Meneely bfbf7a7eba Added support for linear and radial gradients
Closes #29
2015-01-26 22:22:09 -05:00
Andy Meneely bde7fe018e Added a a sample table for showing the built-in color constants 2015-01-26 12:03:07 -05:00
Andy Meneely f3e3082f0e Implement showcase feature
#Closes 26
2015-01-05 21:09:35 -05:00