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

feat: add support for character spacing #253

Merged
merged 1 commit into from
May 10, 2023

Conversation

mbrgm
Copy link

@mbrgm mbrgm commented May 7, 2023

This allows setting the (inter-)character spacing for the current font using pdf.SetCharSpacing(charSpacingInPt).

I tried to implement this as complete as possible and it works for my use case, but I am missing the detailed insight into this library to judge whether there is something missing. Feedback very much appreciated!

This allows setting the (inter-)character spacing for the current font
using `pdf.SetCharSpacing(charSpacingInPt)`.
@oneplus1000 oneplus1000 merged commit 425ac2a into signintech:master May 10, 2023
2 checks passed
@oneplus1000
Copy link
Collaborator

Thanks for the pull request, I have merged successfully. But with a few code changes, I added that it can be modified to other units besides pt.

// SetCharSpacing : set the character spacing of the currently active font
func (gp *GoPdf) SetCharSpacing(charSpacing float64) error {
	gp.UnitsToPointsVar(&charSpacing)
	gp.curr.CharSpacing = charSpacing 
	return nil
}

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.

None yet

2 participants