Skip to content
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

feature/underline-strikethrough #505

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lyind
Copy link

@lyind lyind commented Jan 7, 2025

Description

This adds fontstyle.Type constants Underline and Strikethrough to make use of gofpdf's U (underline) and S (strike-through) font styles.

As those are often required to easily render underlined or stroke-through text, explicitly mentioning them in the constants should benefit many users of the library.

Related Issue

Checklist

check with "x", ONLY IF APPLIED to your change

  • All methods associated with structs has func (<first letter of struct> *struct) method() {} name style.
  • Wrote unit tests for new/changed features.
  • Followed the unit test when,should naming pattern.
  • All mocks created with m := mocks.NewConstructor(t).
  • All mocks using m.EXPECT().MethodName() method to mock methods.
  • Updated docs/doc.go and docs/*
  • Updated example_test.go.
  • Updated README.md
  • New public methods/structs/interfaces has comments upside them explaining they responsibilities
  • Executed make dod with none issues pointed out by golangci-lint

@lyind
Copy link
Author

lyind commented Jan 7, 2025

Using styles that contain U or S yields the expected result (underline, strike-through text rendered) in practice.

Could somebody please have a look, if this change makes sense conceptually?

I would then add the necessary tests/docs.

@Fernando-hub527
Copy link
Collaborator

Using styles that contain U or S yields the expected result (underline, strike-through text rendered) in practice.
Could somebody please have a look, if this change makes sense conceptually?
I would then add the necessary tests/docs.

I believe this is a great feature

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.97%. Comparing base (6923857) to head (a27e85a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #505      +/-   ##
==========================================
+ Coverage   87.94%   87.97%   +0.03%     
==========================================
  Files          61       61              
  Lines        2330     2335       +5     
==========================================
+ Hits         2049     2054       +5     
  Misses        246      246              
  Partials       35       35              
Flag Coverage Δ
unittests 87.97% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lyind lyind force-pushed the fontstyle-underline-strikethrough branch from a27e85a to a1e2f80 Compare February 12, 2025 09:19
@lyind
Copy link
Author

lyind commented Feb 12, 2025

This PR appears ready. Anything else I should do to get this merged?

The docs don't mention fontstyle explicitly, but working with the library the code completion will now make the choices obvious to developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants