- Add a
size_modeoption to theiconmethod that scales the size of the rendered icon to fit within the requested value.
Please see the documentation here for further information. Thanks @pepijnve! Pull Request
- 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
- 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.96is included. Thanks @maneex! Pull Request. - Memoize calls to
Prawn::Icon::FontData#pathto 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- 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_boxmethod to retain the previous inline icon behaviour. - Allow
#formatted_icon_boxto accept absolute positioning parameters (x,y, andat). Thanks @navinspm! - Update fontawesome from version
5.11.2to5.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::FONTDIRandPrawn::Icon::Compatibility::SHIMS. UsePrawn::Icon.configuration.font_directoryandPrawn::Icon::Compatibility.shimsinstead. - Use
Gem::Specification#full_gem_pathto get the root path of the gem directory to resolve #45.
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- returnsnilwith theinline_format: trueparameter.#inline_icon- returnsnil(instead of aPrawn::Text::Formatted::Boxinstance).
You can call #formatted_icon_box to retain the previous inline icon functionality.
- Update FontAwesome from
5.8.2to5.11.2. - See FontAwesome's upgrade guide for more details.
- Update FontAwesome from
5.4.0to5.8.2. - See FontAwesome's upgrade guide for more details.
- Update the Payment Icon URL to https://paymentfont.com.
- Update FontAwesome to version from
5.0.13to5.4.0. - See FontAwesome's release page for more details.
- Move out shim configuration into a
.ymlfile located inside thedata/fonts/fa4/shims.ymlfile. - 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.0of this gem). - Fix a bug in the FontAwesome converter tool by properly requiring
fileutilsbefore execution.
- Introduce backwards compatibility with FontAwesome 4 icon keys by dynamically
rewriting all instances of
fa-*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
STDERRwhen 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.
- [breaking change] Update to FontAwesome 5.0.8. FontAwesome 5 now provides 3 different font families:
brands,regularandsolid. The specifiers for these font icons are now:fab,farandfas. - [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.rbthat accepts the FontAwesome metadata YAML file (link), and generates the correct legend files forbrands,regularandsolidstyles. - Require 'prawn/icon/version' with by default.
- Update dependency gems to latest version.
- Fix
rubocopconfig to show cop names as well as increase the ABC complexity slightly. - Add internal tooling to assist with the SCSS => YAML mappings of FontAwesome and PaymentFont.
- Update FontAwesome to
v4.7.0fromv4.6.3. See changelog. - Update PaymentFont to
v1.2.5fromv1.1.2. See icons. - Update Octicons from to
v4.4.0fromv3.1.0. NOTE: As Octicons have moved from font-based icons to SVG after this version, this will be the final octicon version inprawn/icon. See the wiki. - Fix rubocop warnings for whitespace.
- Update rubocop developement dependency (to
0.44.1). - Add
simplecovas a development dependency and require 100% coverage. - Break out
Prawn::Icon::Interfaceinto its own file. This resolves issue #27.
-
Update FontAwesome from v4.5.0 to v4.6.3. See changelog.
-
Refactor spec files to remove duplication using
letblocks. -
Break internal dependencies to
Prawn::Icon::Baseto allow selective code requires. e.g. (to require onlyprawn/icon/font_data):require 'prawn/icon/base' require 'prawn/icon/font_data'
This resolves issue #27. Thanks @mojavelinux for reporting!
-
Introduce
Prawn::Icon::Errorsto contain internal exception classes. -
Prawn::Icon::FONTDIRis now an alias toPrawn::Icon::Base::FONTDIRfor compatibilty. -
Add basic spec files for
Prawn::Icon::Baseand separate exception classes. -
Minor backwards-compatible code refactor of
Prawn::Icon::FontDatafor readability. -
Add a spec to test inline_icon with final_gap: false to achieve 100% coverage.
- BUGFIX: Inline icons now properly render at the correct cursor position with the correct line gap and box leading#24. Thanks @ToniTornado for reporting!
- Update FontAwesome from v4.4.0 to v4.5.0. See changelog.
- Refactor specs to use
expect(foo).to be trueoverexpect(foo).to be_true. - Update development dependencies to latest.
- (breaking change) Updated Octicons from v2.4.1 to v3.1.0.
- The following icons were removed:
octicon-microsopeocticon-beerocticon-splitocticon-puzzleocticon-stepsocticon-podiumocticon-timerocticon-hourglass- all
octicon-alignmenticons - all
octicon-moveicons - all
octicon-playbackicons - all
octicon-jumpicons
- The following icons were added:
octicon-beakerocticon-bellocticon-desktop-downloadocticon-watchocticon-shield
- Updated FontAwesome from v4.3.0 to v4.4.0. See changelog.
- Moved the internal font directory from
fontstodata/fontsfor consistency between Prawn-related gems #16.
- Update Travis config to relax the versions of
PrawnandRubythat are tested against. See.travis.ymlto see what versions are supported (though you shouldn't have issues with other versions). - Implement inline_format for table icons. #14.
- Updated Octicons to v2.4.1. See changelog between versions 2.1.2 and 2.4.1.
- PaymentFont is now supported and included in
Prawn::Icon.
- Relaxed Prawn runtime dependency from >= 1.3.0 to >= 1.1.0.
- Added CI tests for multiple versions of Prawn.
- Added missing
endstatement to example code in README.
- Added this CHANGELOG.
- Added the
table_iconmethod to simplify icon use in conjuction withPrawn::Table. - Added a
.yardoptsfile for better documentation. - Clean
.gemspecto increase readability.
- Upgraded FontAwesome to
v4.3.0.
- Single-quoted attributes are now supported when using
inline_format: true. - Prawn is now specified as a runtime dependency of
prawn/icon.
- Bugfix for improperly cached font data.
- Added Codeclimate and Travis CI.
- Initial public release.