Skip to content

Commit c148694

Browse files
committed
make public
1 parent 59c12e5 commit c148694

File tree

1 file changed

+8
-2
lines changed
  • lib/thinreports/generator/pdf/document/graphics

1 file changed

+8
-2
lines changed

lib/thinreports/generator/pdf/document/graphics/text.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ def build_text_params(content, attrs)
104104
end
105105
end
106106

107-
private
108-
107+
# @private
108+
#
109109
# @param [Numeric] line_height
110110
# @param [Hash] font
111111
# @option font [String] :name Name of font.
@@ -115,19 +115,25 @@ def text_line_leading(line_height, font)
115115
line_height - pdf.font(font[:name], size: font[:size]).height
116116
end
117117

118+
# @private
119+
#
118120
# @param [String] content
119121
# @return [String]
120122
def text_without_line_wrap(content)
121123
content.gsub(/ /, Prawn::Text::NBSP)
122124
end
123125

126+
# @private
127+
#
124128
# @param [String] font_family
125129
# @param [Array<Symbol>] font_styles
126130
# @return [Boolean]
127131
def need_bold_style_emulation?(font_family, font_styles)
128132
font_styles.include?(:bold) && !font_has_style?(font_family, :bold)
129133
end
130134

135+
# @private
136+
#
131137
# @param [String] font_color
132138
# @param [Integer, Float] font_size
133139
def emulate_bold_style(font_color, font_size, &block)

0 commit comments

Comments
 (0)