Skip to content

Commit 8dbf78c

Browse files
committed
Reformat readme and fix minimum Ruby version
1 parent a906de4 commit 8dbf78c

File tree

1 file changed

+25
-21
lines changed

1 file changed

+25
-21
lines changed

README.md

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This will take an SVG document as input and render it into your PDF. Find out m
1010
http://github.com/prawnpdf/prawn
1111

1212
prawn-svg is compatible with all versions of Prawn from 0.11.1 onwards, including the 1.x and 2.x series.
13-
The minimum Ruby version required is 2.3.0.
13+
The minimum Ruby version required is 2.5.0.
1414

1515
## Using prawn-svg
1616

@@ -33,7 +33,7 @@ Option | Data type | Description
3333
:enable_web_requests | boolean | If true, prawn-svg will make http and https requests to fetch images. Defaults to true.
3434
:enable_file_requests_with_root | string | If not nil, prawn-svg will serve `file:` URLs from your local disk if the file is located under the specified directory. It is very dangerous to specify the root path ("/") if you're not fully in control of your input SVG. Defaults to `nil` (off).
3535
:cache_images | boolean | If true, prawn-svg will cache the result of all URL requests. Defaults to false.
36-
:fallback_font_name | string | A font name which will override the default fallback font of Times-Roman. If this value is set to <tt>nil</tt>, prawn-svg will ignore a request for an unknown font and log a warning.
36+
:fallback_font_name | string | A font name which will override the default fallback font of Times-Roman. If this value is set to `nil`, prawn-svg will ignore a request for an unknown font and log a warning.
3737
:color_mode | :rgb, :cmyk | Output color mode. Defaults to :rgb.
3838

3939
## Examples
@@ -54,31 +54,33 @@ Option | Data type | Description
5454

5555
prawn-svg supports most but not all of the full SVG 1.1 specification. It currently supports:
5656

57-
- <tt>&lt;line&gt;</tt>, <tt>&lt;polyline&gt;</tt>, <tt>&lt;polygon&gt;</tt>, <tt>&lt;circle&gt;</tt> and <tt>&lt;ellipse&gt;</tt>
57+
- `<line>`, `<polyline>`, `<polygon>`, `<circle>` and `<ellipse>`
5858

59-
- <tt>&lt;rect&gt;</tt>. Rounded rects are supported, but only one radius is applied to all corners.
59+
- `<rect>`. Rounded rects are supported, but only one radius is applied to all corners.
6060

61-
- <tt>&lt;path&gt;</tt> supports all commands defined in SVG 1.1, although the
61+
- `<path>` supports all commands defined in SVG 1.1, although the
6262
implementation of elliptical arc is a bit rough at the moment.
6363

64-
- `<text>`, `<tspan>` and `<tref>` with attributes `x`, `y`, `dx`, `dy`, `rotate`, 'textLength', 'lengthAdjust', and with extra properties
65-
`text-anchor`, `text-decoration` (underline only), `font-size`, `font-family`, `font-weight`, `font-style`, `letter-spacing`, `dominant-baseline` (middle only)
64+
- `<text>`, `<tspan>` and `<tref>` with attributes `x`, `y`, `dx`, `dy`, `rotate`, `textLength`, `lengthAdjust`,
65+
and with extra properties `text-anchor`, `text-decoration` (underline only), `font-size`, `font-family`,
66+
`font-weight`, `font-style`, `letter-spacing`, `dominant-baseline` (middle only)
6667

67-
- <tt>&lt;svg&gt;</tt>, <tt>&lt;g&gt;</tt> and <tt>&lt;symbol&gt;</tt>
68+
- `<svg>`, `<g>` and `<symbol>`
6869

69-
- <tt>&lt;use&gt;</tt>
70+
- `<use>`
7071

71-
- <tt>&lt;style&gt;</tt> (see CSS section below)
72+
- `<style>` (see CSS section below)
7273

7374
- `<image>` referencing a JPEG, PNG, or SVG image, with `http:`, `https:`, `data:image/jpeg;base64`,
7475
`data:image/png;base64`, `data:image/svg+xml;base64` and `file:` schemes (`file:` is disabled by default for
7576
security reasons, see Options section above)
7677

77-
- <tt>&lt;clipPath&gt;</tt>
78+
- `<clipPath>`
7879

7980
- `<marker>`
8081

81-
- `<linearGradient>` and `<radialGradient>` are implemented on Prawn 2.2.0+ with attributes `gradientUnits` and `gradientTransform` (spreadMethod and stop-opacity are unimplemented.)
82+
- `<linearGradient>` and `<radialGradient>` are implemented on Prawn 2.2.0+ with attributes `gradientUnits` and
83+
`gradientTransform` (`spreadMethod` and `stop-opacity` are unimplemented.)
8284

8385
- `<switch>` and `<foreignObject>`, although prawn-svg cannot handle any data that is not SVG so `<foreignObject>`
8486
tags are always ignored.
@@ -90,18 +92,19 @@ prawn-svg supports most but not all of the full SVG 1.1 specification. It curre
9092

9193
- attributes on all elements: `class`, `id`, `style`, `transform`, `xml:space`
9294

93-
- the <tt>viewBox</tt> attribute on <tt>&lt;svg&gt;</tt> and `<marker>` elements
95+
- the `viewBox` attribute on `<svg>` and `<marker>` elements
9496

95-
- the <tt>preserveAspectRatio</tt> attribute on <tt>&lt;svg&gt;</tt>, <tt>&lt;image&gt;</tt> and `<marker>` elements
97+
- the `preserveAspectRatio` attribute on `<svg>`, `<image>` and `<marker>` elements
9698

9799
- transform methods: `translate`, `translateX`, `translateY`, `rotate`, `scale`, `skewX`, `skewY`, `matrix`
98100

99-
- colors: HTML standard names, <tt>#xxx</tt>, <tt>#xxxxxx</tt>, <tt>rgb(1, 2, 3)</tt>, <tt>rgb(1%, 2%, 3%)</tt>,
100-
and also the non-standard `device-cmyk(1, 2, 3, 4)` for CMYK colors
101+
- colors: HTML standard names, `#xxx`, `#xxxxxx`, `rgb(1, 2, 3)`, `rgb(1%, 2%, 3%)`, and also the non-standard
102+
`device-cmyk(1, 2, 3, 4)` for CMYK colors
101103

102-
- measurements specified in <tt>pt</tt>, <tt>cm</tt>, <tt>dm</tt>, <tt>ft</tt>, <tt>in</tt>, <tt>m</tt>, <tt>mm</tt>, <tt>yd</tt>, <tt>pc</tt>, <tt>%</tt>
104+
- measurements specified in `pt`, `cm`, `dm`, `ft`, `in`, `m`, `mm`, `yd`, `pc`, `%`
103105

104-
- fonts: generic CSS fonts, built-in PDF fonts, and any TTF fonts in your fonts path, specified in any of the measurements above plus `em` or `rem`
106+
- fonts: generic CSS fonts, built-in PDF fonts, and any TTF fonts in your fonts path, specified in any of the
107+
measurements above plus `em` or `rem`
105108

106109
## CSS
107110

@@ -128,8 +131,9 @@ It does not support text in the clip area, but you can clip shapes and text by a
128131

129132
### Fonts
130133

131-
By default, prawn-svg has a fonts path of <tt>["/Library/Fonts", "/System/Library/Fonts", "#{ENV["HOME"]}/Library/Fonts", "/usr/share/fonts/truetype"]</tt> to catch
132-
Mac OS X and Debian Linux users. You can add to the font path:
134+
By default, prawn-svg has a fonts path of `["/Library/Fonts", "/System/Library/Fonts",
135+
"#{ENV["HOME"]}/Library/Fonts", "/usr/share/fonts/truetype"]` to catch MacOS and Debian Linux users. You can add
136+
to the font path:
133137

134138
```ruby
135139
Prawn::SVG::FontRegistry.font_path << "/my/font/directory"
@@ -141,4 +145,4 @@ In your Gemfile, put `gem 'prawn-svg'` before `gem 'prawn-rails'` so that prawn-
141145

142146
## Licence
143147

144-
MIT licence. Copyright Roger Nesbitt.
148+
MIT licence. Copyright Mog Nesbitt.

0 commit comments

Comments
 (0)