Skip to content

Commit

Permalink
STY: Use OutlineFontFlag (#2985)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-t-1 authored Dec 3, 2024
1 parent 952d80a commit b4af495
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pypdf/_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
GoToActionArguments,
ImageType,
InteractiveFormDictEntries,
OutlineFontFlag,
PageLabelStyle,
TypFitArguments,
UserAccessPermissions,
Expand Down Expand Up @@ -3336,9 +3337,9 @@ def _create_outline_item(
if italic or bold:
format_flag = 0
if italic:
format_flag += 1
format_flag += OutlineFontFlag.italic
if bold:
format_flag += 2
format_flag += OutlineFontFlag.bold
outline_item.update({NameObject("/F"): NumberObject(format_flag)})
return outline_item

Expand Down

0 comments on commit b4af495

Please sign in to comment.