Easy icons for Prawn.
7.0.96
is included. Thanks @maneex! (#59)Prawn::Icon::FontData#path
to improve performance.All Material Design Icons use the font prefix of mdi
. That means that you're able to reference an icon as follows:
require 'prawn/icon'
Prawn::Document.generate('icons.pdf') do |pdf|
pdf.icon 'mdi-beer', size: 60
end
#formatted_icon_box
method to retain the previous inline icon behaviour.#formatted_icon_box
to accept absolute positioning parameters (x
, y
, and at
). Thanks @navinspm!5.11.2
to 5.15.1
.Prawn::Icon.configure do |config|
config.font_directory = '/path/to/fonts'
end
Prawn::Icon::Base::FONTDIR
and Prawn::Icon::Compatibility::SHIMS
. Use Prawn::Icon.configuration.font_directory
and Prawn::Icon::Compatibility.shims
instead.Gem::Specification#full_gem_path
to get the root path of the gem directory to resolve https://github.com/jessedoyle/prawn-icon/issues/45.As noted in https://github.com/jessedoyle/prawn-icon/issues/49, Prawn::Icon
did not correctly respect page boundaries for inline-formatted icons.
The fix for the issue requires Prawn::Icon
to use the inline layout and formatting logic implemented in Prawn
.
This change has ramifications to the #icon
and #inline_icon
method return values, but most applications should not require changes.
Changes are listed below:
#icon
- returns nil
with the inline_format: true
parameter.#inline_icon
- returns nil
(instead of a Prawn::Text::Formatted::Box
instance).You can call #formatted_icon_box
to retain the previous inline icon functionality.
5.8.2
to 5.11.2
.5.4.0
to 5.8.2
.5.0.13
to 5.4.0
..yml
file located inside the data/fonts/fa4/shims.yml
file.1.4.0
of this gem).fileutils
before execution.fa-*
to their appropriate FontAwesome 5 equivalent
key. This is achieved by implementing a shim generated from the FontAwesome metadata.STDERR
when any fa-*
key is
encountered. The compatibility shim will be removed in the next major version
of Prawn::Icon
(3.0.0
).brands
, regular
and solid
. The specifiers for these font icons are now: fab
, far
and fas
.Prawn::Icon::FontData#new
. Previously it was assumed to be fa
.tool/fontawesome/converter.rb
that accepts the FontAwesome metadata YAML file (link), and generates the correct legend files for brands
, regular
and solid
styles.rubocop
config to show cop names as well as increase the ABC complexity slightly.v4.7.0
from v4.6.3
. See changelog.v1.2.5
from v1.1.2
. See icons.v4.4.0
from v3.1.0
. NOTE: As Octicons have moved from font-based icons to SVG after this version, this will be the final octicon version in prawn/icon
. See the wiki.0.44.1
).simplecov
as a development dependency.Prawn::Icon::Interface
into its own file. This resolves issue #27.