char **ptr = &escaped;
(void)xml_escape(o->op.u.text.text, flags, put, ptr);
- o->font = glNewFont(view->widgets, escaped, &view->penColor, pangotext,
+ o->font = glNewFont(view->widgets, escaped, &view->penColor,
font_op->op.u.font.name, font_op->op.u.font.size, 0);
free(escaped);
#define GLCOMP_DEFAULT_WIDTH 10.0f
#define GLCOMP_DEFAULT_HEIGHT 10.0f
- typedef enum { gluttext, pangotext } glCompFontType;
typedef enum { glAlignNone, glAlignLeft, glAlignTop, glAlignBottom,
glAlignRight, glAlignParent, glAlignCenter } glCompAlignment;
typedef struct {
char *fontdesc; //font description , only used with pango fonts
glCompColor color;
- glCompFontType type;
void *glutfont; /*glut font pointer if used */
int transparent;
glCompTex *tex; /* texture, if type is pangotext */
}
-glCompFont *glNewFont (glCompSet * s, char *text, glCompColor * c,glCompFontType type, char *fontdesc, int fs,int is2D)
+glCompFont *glNewFont (glCompSet * s, char *text, glCompColor * c, char *fontdesc, int fs,int is2D)
{
glCompFont *font = gv_alloc(sizeof(glCompFont));
font->reference = 0;
font->color.A = c->A;
font->justify.VJustify = GL_FONTVJUSTIFY;
font->justify.HJustify = GL_FONTHJUSTIFY;
- font->type=type;
font->is2D=is2D;
- if (font->type == gluttext)
- font->glutfont = DEFAULT_GLUT_FONT;
- else
- font->glutfont = NULL;
+ font->glutfont = NULL;
font->fontdesc = gv_strdup(fontdesc);
font->size = fs;
font->color.B = parent->font->color.B;
font->color.A = parent->font->color.A;
- font->type = parent->font->type;
font->glutfont = parent->font->glutfont;
font->fontdesc = gv_strdup(parent->font->fontdesc);
font->size = parent->font->size;
c.G = GLCOMPSET_FONT_COLOR_G;
c.B = GLCOMPSET_FONT_COLOR_B;
c.A = GLCOMPSET_FONT_COLOR_ALPHA;
- font =
- glNewFont (o->common.compset, text, &c, pangotext,
+ font = glNewFont(o->common.compset, text, &c,
GLCOMPSET_FONT_DESC, GLCOMPSET_FONT_SIZE,1);
}
return font;
void glprintfglut(void *font, GLfloat xpos, GLfloat ypos, GLfloat zpos, char *bf);
glCompFont *glNewFont(glCompSet * s, char *text, glCompColor * c,
- glCompFontType type, char *fontdesc, int fs,int is2D);
+ char *fontdesc, int fs,int is2D);
glCompFont *glNewFontFromParent(glCompObj * o, char *text);
void glDeleteFont(glCompFont * f);
void glCompDrawText(glCompFont * f,GLfloat x,GLfloat y);