Skip to content

Commit

Permalink
Update doc strings for text width with c_margin info (#1012)
Browse files Browse the repository at this point in the history
  • Loading branch information
matipos2 authored Nov 13, 2023
1 parent 031f3e7 commit f97df60
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fpdf/fpdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,9 @@ def get_string_width(self, s, normalized=False, markdown=False):
Returns the length of a string in user unit. A font must be selected.
The value is calculated with stretching and spacing.
Note that the width of a cell has some extra padding added to this width,
on the left & right sides, equal to the .c_margin property.
Args:
s (str): the string whose length is to be computed.
normalized (bool): whether normalization needs to be performed on the input string.
Expand Down Expand Up @@ -2691,7 +2694,8 @@ def cell(
character string. The upper-left corner of the cell corresponds to the current
position. The text can be aligned or centered. After the call, the current
position moves to the selected `new_x`/`new_y` position. It is possible to put a link
on the text.
on the text. A cell has an horizontal padding, on the left & right sides, defined by
the.c_margin property.
If automatic page breaking is enabled and the cell goes beyond the limit, a
page break is performed before outputting.
Expand Down Expand Up @@ -3361,7 +3365,8 @@ def multi_cell(
reaches the right border of the cell, or explicit (via the `\\n` character).
As many cells as necessary are stacked, one below the other.
Text can be aligned, centered or justified. The cell block can be framed and
the background painted.
the background painted. A cell has an horizontal padding, on the left & right sides,
defined by the.c_margin property.
Args:
w (float): cell width. If 0, they extend up to the right margin of the page.
Expand Down

0 comments on commit f97df60

Please sign in to comment.