-
Notifications
You must be signed in to change notification settings - Fork 252
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
Remove dependency on Cairo and Fontconfig #39
Comments
I'd like to. The main thing that makes cairo/fontconfig required and not optional is that I need a way of estimating the size of text rendered in a particular font. I haven't been following things very closely. Is the plan with the Graphics module to add a layer of abstraction here? Adding functions to compute text extents would help make this possible. I know that R's low level graphics api has these functions. |
@StefanKarpinski told me about the reason for fontconfig. Just thinking out aloud - would it be possible to say simplify things by just using a few fixed fonts and specific sizes, where these defaults are known? In case fontconfig is available, the general features could be turned on. It is a good idea to add some of this to the graphics API that @JeffBezanson has started in Base. |
It would hard to do unless it was a monospaced font. Proportional fonts use kerning tables and ligatures, so computing text extents is complicated. That said, if it just made exaggerated guesses, the output would at least be legible, if a little sloppy looking. |
That's what I was going for - maybe give up some of the beauty in the short term for ease of use. Perhaps it won't be too bad. |
I have a fallback in place now. Glyph sizes for a handful of fonts are calculated in advance and included, if pango, fontconfig, etc can't be loaded, it uses those glyph sizes to estimate text extents. Right now I'm still requiring the Cairo package, even though it's no longer strictly required. I don't think we have a way to have "recommended" packages. |
Thanks! Why not just use try For the next level of greed, is it possible to get interactive graphics? I mean say |
It would be great if the dependencies on Cairo and Fontconfig could be removed, from an ease of installation perspective.
The text was updated successfully, but these errors were encountered: