Closed ovhpa closed 5 years ago
I have struggled with the
error for some time now. Will be great if it never darkens our door again!
So where is the font actually set and how do I get a list of possible fonts?
I think it's gone for good :D Just change the font using GDIS own interface: On menu: View/Display Properties/OpenGL/Change graphics font.
I didn’t know that Sean implemented that! Nice!
On 10 Jun 2019, at 9:28 pm, Okadome Valencia notifications@github.com<mailto:notifications@github.com> wrote:
I think it's gone for good :D Just change the font using GDIS own interface: On menu: View/Display Properties/OpenGL/Change graphics font.
This is an important fix for distributions which use a gtkglext version for which gdk_gl_font_use_pango_font have been removed.
The root of the problem was the removal of gdk_gl_font_use_pango_font which had no actual (or practical) replacement. It impacted and continue to impact several package (including ghemical until now and gabedit on some distributions, both of which I sometimes use).
I choose to use a method which involves pango + cairo writing the text onto a buffer, then draw that buffer on the screen directly using
glDrawPixels
. This may not be the recommended method (according to forums writing text on a texture then placing it on the screen is better) but I think it is more appropriate.Also the openGL part of the code:
is close to the original:
The added
glPixelZoom
is required because for some reasonglDrawPixels
draw the buffer upside-down. ^^'GdkGLExt-WARNING **: cannot load PangoFont
will not appear and all text will actually be displayed. The fonts are used "on time" and not preloaded, so it would even be theoretically possible to use several fonts on the same structure.pango_layout_set_markup
type, which means we can add dynamical text that contain pango markup language. So we could have a 14C labelled atom :DHowever, should there be some trouble, please let me know.
PS: I'm committing this now, because we require it for the incoming workshop. PPS: I also include some minor fixing (mostly to remove some of the warning messages).