Skip to content

3.0.0

Compare
Choose a tag to compare
@jessedoyle jessedoyle released this 11 Nov 06:46
· 22 commits to master since this release
49c26ad
  • 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, and at). Thanks @navinspm!
  • Update fontawesome from version 5.11.2 to 5.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 and Prawn::Icon::Compatibility::SHIMS. Use Prawn::Icon.configuration.font_directory and Prawn::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 - 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.