diff --git a/docs/colors.rst b/docs/colors.rst index 9de9e57..ab02a0b 100644 --- a/docs/colors.rst +++ b/docs/colors.rst @@ -40,7 +40,7 @@ by custom name In your ``config.yml``, as described in :doc:`/config`, you can specify custom names of colors. For example, ``'foreground'``. Gradients --------- +--------- In most places where colors are allowed, you may also supply a string that defines a gradient. Squib supports two flavors of gradients: linear and radial. Gradients are specified by supplying some xy coordinates, which are relative to the card (not the command). Each stop must be between ``0.0`` and ``1.0``, and you can supply as many as you like. Colors can be specified as above (in any of the hex notations or built-in constant). If you add two or more colors at the same stop, then the gradient keeps the colors in the in order specified and treats it like sharp transition. diff --git a/docs/dsl/csv.rst b/docs/dsl/csv.rst index 37a65a8..8f5ab07 100644 --- a/docs/dsl/csv.rst +++ b/docs/dsl/csv.rst @@ -71,11 +71,11 @@ To get the sample Excel files, go to `its source )`_. This `description `_ is also quite good. + the Font description string, including family, styles, and size. (e.g. ``'Arial bold italic 12'``). For the official documentation, see the `Pango docs `_. This `description `_ is also quite good. font_size default: ``nil`` diff --git a/docs/layouts.rst b/docs/layouts.rst index 5da2fba..916f973 100644 --- a/docs/layouts.rst +++ b/docs/layouts.rst @@ -250,7 +250,7 @@ economy.yml https://github.com/andymeneely/squib/tree/master/lib/squib/layouts/economy.yml tuck_box.yml -~~~~~~~~~~~ +~~~~~~~~~~~~ Based on TheGameCrafter's template. @@ -263,7 +263,7 @@ https://github.com/andymeneely/squib/tree/master/lib/squib/layouts/tuck_box.yml hand.yml -~~~~~~~~~~~ +~~~~~~~~ .. raw:: html @@ -273,7 +273,7 @@ hand.yml https://github.com/andymeneely/squib/tree/master/lib/squib/layouts/hand.yml playing_card.yml -~~~~~~~~~~~ +~~~~~~~~~~~~~~~~ .. raw:: html diff --git a/docs/text_feature.rst b/docs/text_feature.rst index a2870c5..08a341f 100644 --- a/docs/text_feature.rst +++ b/docs/text_feature.rst @@ -1,7 +1,6 @@ The Mighty text Method ====================== - The :doc:`/dsl/text` method is a particularly powerful method with a ton of options. Be sure to check the option-by-option details in the DSL reference, but here are the highlights. Fonts @@ -42,7 +41,7 @@ Hints Laying out text by typing in numbers can be confusing. What Squib calls "hints" is merely a rectangle around the text box. Hints can be turned on globally in the config file, using the :doc:`/dsl/hint` method, or in an individual text method. These are there merely for prototyping and are not intended for production. Additionally, these are not to be conflated with "rendering hints" that Pango and Cairo mention in their documentation. Extents ------- +------- Sometimes you want size things based on the size of your rendered text. For example, drawing a rectangle around card's title such that the rectangle perfectly fits. Squib returns the final rendered size of the text so you can work with it afterward. It's an array of hashes that correspond to each card. The output looks like this:: @@ -56,7 +55,7 @@ will output:: [{:width=>109, :height=>55}, {:width=>142, :height=>55}] # Hello was 109 pixels wide, World 142 pixels Embedding Images ------------------- +---------------- Squib can embed icons into the flow of text. To do this, you need to define text keys for Squib to look for, and then the corresponding files. The object given to the block is a ``TextEmbed``, which supports PNG and SVG. Here's a minimal example:: @@ -111,6 +110,6 @@ Sample: config_text_markup.rb :language: ruby :linenos: -.. literalinclude:: ../samples/config_disable_quote.yml +.. literalinclude:: ../samples/config_disable_quotes.yml :language: ruby :linenos: