mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-03 04:14:20 +01:00
WINGs: Add optional Pango text layout support
Currently WINGs renders text using Xft directly which does not support any advanced text layout that is needed for scripts like Arabic or Indic scripts (or even things like automatic ligature support for Latin script). With Pango we also get text fallback for free, so no more square boxes for characters not supported in the current font (unless no font on the system supports the specified character, of course). This patch introduces support for using Pango to render the text (though its Xft backed), to avoid forcing the additional dependency to everyone it is made off by default. Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
committed by
Carlos R. Mafra
parent
1485233292
commit
e3dcadde30
@@ -5,6 +5,9 @@
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#ifdef USE_PANGO
|
||||
#include <pango/pango.h>
|
||||
#endif
|
||||
|
||||
#include <WINGs/WINGs.h>
|
||||
|
||||
@@ -445,6 +448,10 @@ typedef struct W_Font {
|
||||
short y;
|
||||
short refCount;
|
||||
char *name;
|
||||
|
||||
#ifdef USE_PANGO
|
||||
PangoLayout *layout;
|
||||
#endif
|
||||
} W_Font;
|
||||
|
||||
#define W_FONTID(f) (f)->font->fid
|
||||
|
||||
Reference in New Issue
Block a user