-
Notifications
You must be signed in to change notification settings - Fork 265
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
Support for striketrough text on write_html function #1322
Comments
Sure, this an excellent suggestion for a feature! Pull Requests are welcome to implement this 🙂 First, we could either implement this in If we chose the second option, "strikethrough" should be part of the IMHO, yes, we should implement strikethrough in exactly the same way that underline is currently implemented. |
I agree it would be a nice addition and we should implement strikethrough like underline. We load underline thickness and position from the font's "post" table - with hardcoded values for the core fonts. |
I opened PR #1340 as a starting point. It does not seem that yStrikeoutPosition / yStrikeoutSize are always present in OS/2 tables. |
I figured it out, I was using the wrong table in the font 😅 The PR is ready for review |
This has been implemented! It can be tested by using the latest, unreleased, development version straight from the development branch of this repository:
The next release will include this new feature. |
Please explain your intent
It would be greate to have support for striketrough text on
write_html
function. Currently it already works for bold, italic and underline.Describe the solution you'd like
When using
write_html()
function it is already possible to usetag_styles
argument to map the tag<s>
to aTextStyle
orFontFace
, but unfortunately there is no way to set the emphasis to striketrough. Maybe adding a new Text Emphasis for striketrough ("S") would be enough. However I am not sure how to actually render this on the PDF itself.Additional context
With the following snippet it's possible to see that
<b>
tag works just fine but when I try with<s>
tag it does not work:The text was updated successfully, but these errors were encountered: