Skip to content

Commit

Permalink
Clarify FPDF.add_font()'s style parameter accepted values (#1263)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhenriquelc committed Sep 20, 2024
1 parent d9f5d36 commit 3e5e783
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ This can also be enabled programmatically with `warnings.simplefilter('default',
* [`FPDF.write_html()`](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.write_html): indentation of HTML elements can now be non-integer (float), and is now independent of font size and bullet strings.
* improved performance of font glyph selection by using functools cache
- New translation of the tutorial in Türkçe, thanks to @natgho: [Türkçe](https://py-pdf.github.io/fpdf2/Tutorial-tr.html);
* Clarified usage of the `style` attribute in [`FPDF.add_font()`](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.add_font)

## [2.7.9] - 2024-05-17
### Added
Expand Down
2 changes: 1 addition & 1 deletion fpdf/fpdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,7 @@ def add_font(self, family=None, style="", fname=None, uni="DEPRECATED"):
Args:
family (str): optional name of the font family. Used as a reference for `FPDF.set_font()`.
If not provided, use the base name of the `fname` font path, without extension.
style (str): font style. "B" for bold, "I" for italic.
style (str): font style. "" for regular, include 'B' for bold, and/or 'I' for italic.
fname (str): font file name. You can specify a relative or full path.
If the file is not found, it will be searched in `FPDF_FONT_DIR`.
uni (bool): [**DEPRECATED since 2.5.1**] unused
Expand Down

0 comments on commit 3e5e783

Please sign in to comment.