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

is it possible to be pure go? #4

Open
Monirzadeh opened this issue Jun 26, 2024 · 2 comments
Open

is it possible to be pure go? #4

Monirzadeh opened this issue Jun 26, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Monirzadeh
Copy link
Contributor

Hi
i plan to use this library in Shiori but using C block me to do that. (project will not build)
i am not familiar with writer library code base yet but is it possible to update to remove any C code and be a pure go library?

@haashemi
Copy link
Owner

Hi there.

As writer fully depends on harfbuzz (which is a C library), it wouldn't be that simple to do and would have its own drawbacks.

Possibility:

  • Windows: We can use Harfbuzz's dll directly.
  • Linux: There are some packages for this, but I've never used them.
  • MacOS: I have zero experience with MacOS, sadly.

The problem:
You'd still have to have the harfbuzz library (.dll / .so) file in your PATH. But you can embed it in the binary if you use CGO If I'm not mistaken.
Also, there are pure Golang ports of Harfbuzz (like here), but I don't think it really matches with the goal of this package.

With that said, making it pure go is almost impossible, but I may add no-cgo options in the future to the upstream package (which is go-harfbuzz).

@haashemi haashemi closed this as not planned Won't fix, can't repro, duplicate, stale Jun 26, 2024
@haashemi
Copy link
Owner

I've opened the issue on the go-harfbuzz repo. I'll start working on it first, and then #3.

As I'm busy IRL (I'm a university student) right now, we can stale things for a short time, but I'll come back and work on them as soon as I can.

@haashemi haashemi reopened this Jun 26, 2024
@haashemi haashemi added the enhancement New feature or request label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants