Releases: jessedoyle/prawn-icon
Releases · jessedoyle/prawn-icon
4.1.0
4.0.0
- breaking change - Update from FontAwesome 5.11.2 to 6.7.1. Please see the notes here for information related to changed or removed icons in the set. Thanks @pepijnve! Pull Request
3.1.0
- Update our CI matrix to include recent versions of Prawn and Ruby! Thanks @petergoldstein! (#55)
- Resolve a few code smells that were flagged by Rubocop.
- Material Design Icons are now supported! Currently version
7.0.96
is included. Thanks @maneex! (#59) - Memoize calls to
Prawn::Icon::FontData#path
to improve performance.
Material Design Icons
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
3.0.0
- breaking change - Fix incorrect layout and line-wrapping logic for inline-formatted icons. Please see Inline Format Changes for more details.
- Add a
#formatted_icon_box
method to retain the previous inline icon behaviour. - Allow
#formatted_icon_box
to accept absolute positioning parameters (x
,y
, andat
). Thanks @navinspm! - Update fontawesome from version
5.11.2
to5.15.1
. - See FontAwesome's upgrade guide for more details.
- Introduce a configuration mechanism so that the font directory can be customized as follows:
Prawn::Icon.configure do |config|
config.font_directory = '/path/to/fonts'
end
- Deprecate the global variables of
Prawn::Icon::Base::FONTDIR
andPrawn::Icon::Compatibility::SHIMS
. UsePrawn::Icon.configuration.font_directory
andPrawn::Icon::Compatibility.shims
instead. - Use
Gem::Specification#full_gem_path
to get the root path of the gem directory to resolve #45.
Inline Format Changes
As noted in #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
- returnsnil
with theinline_format: true
parameter.#inline_icon
- returnsnil
(instead of aPrawn::Text::Formatted::Box
instance).
You can call #formatted_icon_box
to retain the previous inline icon functionality.
2.5.0
- Update FontAwesome from
5.8.2
to5.11.2
. - See FontAwesome's upgrade guide for more details.
2.4.0
- Update FontAwesome from
5.4.0
to5.8.2
. - See FontAwesome's upgrade guide for more details.
- Update the Payment Icon URL to https://paymentfont.com.
2.3.0
- Update FontAwesome to version from
5.0.13
to5.4.0
. - See FontAwesome's release page for more details.
2.2.0
- Move out shim configuration into a
.yml
file located inside thedata/fonts/fa4/shims.yml
file. - Update FontAwesome TTF files and legend files from 5.0.8 to 5.0.13.
- Add additional compatibility shims that were missing for some icons from FontAwesome 4. This version release is now fully backwards-compatible with all icon specifiers present in FontAwesome 4 (via version
1.4.0
of this gem). - Fix a bug in the FontAwesome converter tool by properly requiring
fileutils
before execution.
2.1.0
- Introduce backwards compatibility with FontAwesome 4 icon keys by dynamically
rewriting all instances offa-*
to their appropriate FontAwesome 5 equivalent
key. This is achieved by implementing a shim generated from the FontAwesome metadata. - Introduce a deprecation warning written to
STDERR
when anyfa-*
key is
encountered. The compatibility shim will be removed in the next major version
ofPrawn::Icon
(3.0.0
). - See the discussion here for more details.
2.0.0
- [breaking change] Update to FontAwesome 5.0.8. FontAwesome 5 now provides 3 different font families:
brands
,regular
andsolid
. The specifiers for these font icons are now:fab
,far
andfas
. - [breaking change] Remove GitHub Octicons because Octicons are now only delivered via SVG.
- [breaking change] Make the font specifier a required attribute for
Prawn::Icon::FontData#new
. Previously it was assumed to befa
. - Write a new tool
tool/fontawesome/converter.rb
that accepts the FontAwesome metadata YAML file (link), and generates the correct legend files forbrands
,regular
andsolid
styles. - Require 'prawn/icon/version' with by default.