Open protogeezer opened 7 years ago
I'm pretty new to BinDeps. I think @tkelman or @ranjanan might be better able to answer your question.
Understood. cc’ing you was mostly to alert you to what’s coming.
The issue that will need to be considered is if FreeDesktop isn’t going to update Cairo anytime soon AND IF gadfly needs “the big fix” for the work I wish to contribute.
The sorts of bug fixes and/or new features I’ve got queued up are:
(1) enabling Freetype fonts (so gadfly will recognize system fonts and fonts with attributes like bold/italic) (2) updating how pango is used to place text (right now Gadfly seems to systematically ignore x-bearings so text can be placed too far right) (3) plot padding will be computed correctly - which includes changing the aspect ratio of the plot rather than non-symetric stretching. Or ignoring the aspect ratio all together. Try doing a plot with 0 plot padding (tight borders) and you’ll usually see some clipping of the x labels… and a large gap usually on the bottom. (4) allowing guides to be placed inside the main plot area. This depends on computing accurate text extents, so boxes can be placed around the guide, and maybe painted with a background to cover grid lines...
and so forth. Stuff I need for my research publications.
Stephen
On Nov 28, 2016, at 12:14 PM, Tamas Nagy notifications@github.com wrote:
I'm pretty new to BinDeps. I think @tkelman or @ranjanan might be better able to answer your question.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
That's a great set of things. It may be out of scope of your work, but it would be nice to eventually have support for displaying latex equations in Gadfly.
A shot in the arm to be sure.
Good typography is not out of the realm of possibility. LaTex equations are on the list - but it basically seems impractical using a Gnome/GTK backend. Or web-based svg.
There have been abortive efforts to, in essence, parse a small subset of latex directly into Compose primitives (there is still a bit of that in the Compose code). I thought about writing a PoDoFo (yes, that’s a thing) PDF parser. Then base a GTK renderer on that. Nope - way too hard. Another bad idea was to try to use WebKit to run MathJax, which can be coerced into outputting an SVG string. But then you’re stuck trying to render SVG. Qt supports some amount of SVG display, not OS X. LibRSVG is based on GTK/Cairo and SVGKit just isn't good/complete enough.
IMHO the only pro-grade alternative is to use one of the unicode savvy latex interpreters to output a pdf and render that (properly).
The cleanups I’m doing are to setup a refactor of Compose to abstract the backend enough that I can swap out GTK and substitute either a “pure” cocoa backend or, with a bit more work, Qt.
Both of those frameworks provide classes to render PDF content in a sub-window, or view… Then we just have to manage the view containing the (hidden) content. I believe I can make that work - and cross platform with a big caveat:
The reason I’m favoring Cocoa/Swift is that it’s a lot less work, and it will be sufficient to find out whether it is possible to get the base Julia runtime to play ball with a system architecture that is a bit less base Unix and more window-manager oriented. I don’t know if that’s possible without replacing LibUV with either Cocoa or Qt - it’s the runloop thing. There have been a couple of efforts to build a cooperative cocoa/libuv or qt/libuv runtime. Maybe that will work...
In any event, I’m going to be out in SF in the middle of Dec while my wife attends the AGU meeting (hotel in Union Square). If convenient, perhaps we can meet briefly and talk Gadfly plans? If thee is a way to build some awareness or cooperation from the core group, it would really improve the odds of creating a completely top flight graphics package. Take that Matplotlib!!!
Stephen
On Nov 28, 2016, at 4:54 PM, Tamas Nagy notifications@github.com wrote:
That's a great set of things. It may be out of scope of your work, but it would be nice to eventually have support for displaying latex equations in Gadfly.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Here are a before and after on the tight bounding box, and interior guide...
ost-3yrs-gr3-6-mathz-699-72192.0-tightbb.pdf ost-3yrs-gr3-6-mathz-699-72192.0.pdf
I would be open to discussing the future of Gadfly with you. I'm available around that time. Could you email me? (my email is on my profile page).
I'm working on a group of text/font bug fixes for Gadfly - I suspect that a fairly hefty bug that was fixed in Cairo 1.14.6 last June - but not yet included in a release or snapshot could take care of a number of bugs with text placement, and painting in general, in pdf and ps output.
I need to be able to build a version of Gadfly/Compose/Cairo using a libCairo based on the Cairo master, or at least build the dependency after applying the patch that has the bug fix I'm interested in.
I tried modifying the build.jl file for Cairo.jl that points to a source archive on my machine:
which doesn't work.
Any suggestions as to how to proceed would be greatly appreciated. @tlnagy