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.