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

Implement pango frontend without gtk+ #574

Open
acertain opened this issue Jul 21, 2014 · 1 comment
Open

Implement pango frontend without gtk+ #574

acertain opened this issue Jul 21, 2014 · 1 comment

Comments

@acertain
Copy link
Contributor

I've been thinking about implementing a new backend, and here are my thoughts:

gtk+ is a rather large dependency, and it would be nice to not require gtk+, especially because it's tricky to get gtk+ to look nice on OSX.

After some thought, I think the best way to do cross-platform without gtk+ is just to use pango more directly, maybe on top of cairo.

There are 3 ways of doing this that I know of:

  • pango+cairo+OpenGL: disadvantage: cairo has a gl backend that is disabled by default on most platforms, so we would probably need to ship our own cairo, advantage: shouldn't need any platform-specific code if we use say GLFW.
  • pango+cairo's platform specific backends: advantage: cairo has these enabled by default, disadvantage: platform-specific code
  • pango's platform specific backends: advantage: maybe this would be faster? disadvantage: more complex platform-specific code.

Note for all of these approaches, the haskell packages for pango and cairo don't include bindings for platform-specific APIs or the gl backend.

Shipping our won versions of cairo isn't IMHO such a bad thing, because on OSX using homebrew, the default version of pango and cairo (and gtk+) don't use Quartz, and instead use the ugly X11 system, so shipping our own versions could make yi much nicer fox OSX users by default. Also, installing external dependencies is a pain on Windows.

Finally, gtk+ gives us tabs, which could be implemented using cairo, but would be more work to do.

Note that GLFW would deal with input for us, and I don't know about dealing with input with the other options.

I'm planning to implement the first option.

@Fuuzetsu
Copy link
Member

It seems like a big change for the sake of havaing Yi look nicer on OSX. Perhaps support on OSX should be fixed (how is it broken exactly?) and/or clear instructions provided how to make it look nice.

Will pango+cairo+OpenGL option end up being more work for us? You say that the advantage is being able to use GLFW but I don't know whether it is something that we want to do to begin with.

Using Qt as a cross-platform interface was also speculated but AFAIK there is little in way of Qt support in Haskell eco-system at the moment.

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

No branches or pull requests

2 participants