-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pdf.font_style = "B" and pdf.emphasis = "BOLD" should behave the same way as pdf.set_font(style="B") #1223
Comments
At the moment, I think that proposed solution would result in infinite recursion. We'd have to move the part of I agree that in the user facing API, we should try to treat "bold", "italic", and "underline" as similarly as possible. |
Yes, you are right, we would have to take care of that.
Could you please develop a bit why? This may be subjective, I find this actually a lot more elegant & handy than having 3 attributes 😅 I see the following "factual" benefits of having a single attribute (
However, I agree that having 4 distinct attributes would probably make the code often simpler to grasp, and would hence be better for the readibility of |
A PR has been created by @smilerightnow in September: #1254 This issue can be considered as "assigned & in progress" while this PR is open 🙂 |
Problem
As demonstrated in #1220 (comment),
currently setting
pdf.font_style = "B"
does not properly apply a bold emphasis to the following text:Describe the solution you'd like
As part of this change, I suggest to replace the
.underline
&.font_style
attributes ofFPDF
by getters & setters modifying an underlying
._emphasis
property.RFC: Whad fo you think of this proposal?
The text was updated successfully, but these errors were encountered: