-
Notifications
You must be signed in to change notification settings - Fork 56
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
Windows 7 font issues #138
Comments
My mistake: Apparently this API is for "toy" examples only. Font availability is not guaranteed. |
I looked a the provided examples in To be honest, the |
To make a longer story short: the libcairo font interface is rather low level, that's why you find some pango interfacing there also (and that's also the reason why in Compose.jl there is more pango adaptation incl. font selection). The examples in Samples.md are drawing examples only. |
you can use the exported text interface.
|
Interesting... The Pango Even stranger: unlike Sadly, the Thanks for the help anyways. |
That's good. ... But Question Moreover
I would have expected:
|
To your
well, just implement it. You can see from the implementation of text how to use update_layout which is the main interface between cairo's CTM and pango's internal CTM. The major problem (and more of a problem in Windows OS) is to correctly find and select an installed font (for proper definition of installed). Just look into https://www.cairographics.org/manual/cairo-text.html, esp. https://www.cairographics.org/manual/cairo-text.html#cairo-select-font-face and https://developer.gnome.org/pango/unstable/pango-Cairo-Rendering.html. |
Fair enough. I will take a closer look at the code then.
Thanks for the references. Fantasy does map to a font on my Linux... but it has limited unicode support. It would not work well with showoff.jl (for example). |
I know it's not helpful, but i could reproduce your problem on a Win7. I really see this as font selection problem, because only some glyphs are not available, but the general text setting is working. |
Well, it is good to know. That means it is probably not a setup issue on my system.
Agreed. I guess my question is: Is this a bug? It is clear to me that Cairo can find reasonable fonts for Windows 7 + (Generated using slightly altered code):
I admit there might be more going on in the backend, but I would have expected even the low-level interface to be able to find proper mappings for the "default fonts". |
What would you consider the bug? I read today i little bit into libcairo sources and i'm reasonably confused how even the default fonts are selected (per OS). cairo (the library, not Cairo.jl) makes no guarantees for the fonts except the cairo:$family which seems to be built-in in all cairo variants (there is a long list of option for building the library). To your #138 (comment): |
I saw that too... but I was not able to make it work. I tried running the above code with
Maybe that's the problem... I need to figure out how to compile the fonts in, or something. Well, I think it sounds like there is no issue with Cairo.jl. Feel free to close this issue. |
@ma-laforge Maybe a last check: Which version of libcairo are you using?
|
Not sure what the version number means, but I get: |
Hopefully old enough to close. Please reopen if still an issue on modern Windows. |
Hi,
I could not find an issue on this, but I am having font issues Cairo (I presume). I notice it on Gtk displays.
Sample Code
The text was updated successfully, but these errors were encountered: